VBA Interview Questions - Part 2 - Variables and Data types

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 & Happy coding!!!

Comment and share this post to your friends and colleagues 😀

Comments

  1. Keep continue your great work in this way too. It is really helpful for the beginners to understand Visual Basic Applications.

    ReplyDelete

Post a Comment

Popular posts from this blog

VBA Interview questions - screen updating

VBA Interview questions - Part 3 - Array concept