Hello Readers, Welcome to Coding by Learning !!! 😀 6. What is data type? As name says it defines type of data the value holds that can be stored in to variable 7. What are different data types available in VBA? VBA has multiple data types in order to handle data for the programming. Some of the major data types which often be used are: integer, single, long, double, range, date, variant, object 8. What is Variant data type? Variant is the special data type which can accept any type of data. Variable which is declared as variant will get data type based on the value it is assigned 9. How to declare a variable in VBA? Using Dim keyword variable will be declared in VBA. Syntax is : Dim VariableName As Datatype 10. Is it possible to declare a variable without data type in VBA? If yes, What data type it holds? It is possible. If developer declares a variable without mentioned any data type then it will be considered as variant data type. Happy learning & ...
Hello Readers, Welcome to Coding by Learning !!! 😀 Take this scenario. There is an automation requirement where there is a master data file. User manually copy paste some range/cell to master file. Lets consider user needs to copy from 20 files to master file. Developer automated this manual entry/copy paste activity using VBA code. But after the deployment user feels while running the code, it keeps changing the input file, copying required data, going to master file, pasting data to master file, going to input file, copying required data, pasting data to master file and the activity continues until loop runs. As a user system looks like flipping pages of book which does not look good. Basically users wants to see only output after running automation. System screen should stay in the VBA macro file until getting output. How you make the code user convenience. Here VBA concept screen updating comes into picture . It is question might be asked in almost all the VBA int...
Hello Readers, Welcome to Coding by Learning !!! 😀 Lets see interview questions on VBA array concepts. 1. What is array? Array is a group of elements of similar data types 2. How to declare a array variable? Syntax : Dim arrayVariableName(size) As Datatype Ex : Dim fruits(5) As String 3. What is ReDim keyword in VBA? Using ReDim keyword developer can redefine the size of an array 4. How to use ReDim in VBA? Syntax : ReDim arrayVariableName(size) As Datatype Ex : ReDim fruits(10) As String 5. I have already stored some elements in the array, what will happen if I redefine the size? When you redefine the size of an array without preserve keyword, then already stored elements will be erased from the array 6. What is preserve keyword in VBA? Preserve keyword in VBA helps to retain already stored elements in the array even though it is redefined. Example : ReDim Preserve fruits(10) As String 7. What is option base in VBA? Option base is related with array concepts....
Comments
Post a Comment