Answer :
Microsoft holds license for Visual basic applications and it has been developing that language. Visual basic applications have an embedded programming environment which assists programmers in developing custom solutions by using almost all features of visual basic. Applications which are currently hosting visual basic can fully utilize the power of Visual basic applications because they have an added functionality and ease of visual basic applications.
Answer :
- Visual basic is useful if you are planning to develop your programs from scratch. This language helps you in developing Active x controls, exe files, etc.
- Visual script is a powerful tool, through which you can create small scale applications on web pages, automation applications, etc. Integrated development environment is not present for VB script.
- Visual basic applications are very useful in automating your existing application. VB application is useful for developing already existing applications.
Microsoft Excel Interview QuestionsAnswer :
Most of the visual basic applications are available on 32 bit Intel platforms. These applications also run on many of the windows software systems such as server 2003, XP, Vista, etc.
Answer :
COM add-ins are software program's which are integrated into an application and they add already built in features to an existing application. They have common architecture across multiple applications which help in deploying applications much faster across varied applications. Microsoft 2007 supports various COM add-INS.
VBA For Excel TutorialAnswer :
Microsoft office 2007 supports Visual basic and has support with many various features. With MS office 2007 you can use desktop applications for creating tailored business solutions. These desktop applications can be used directly as construction sites.
Microsoft Word Interview Questions Answer :
Microsoft Visual basic has its host of problems one such being macros, Macros can be created which can create a havoc for a programmer with good intentions. Also the security issue rests in the hands of the user and not the programmer as such. A user can manipulate the VBA document.
Answer :
Line explicit function makes the compiler to identify all the variables which are not specified by the dim statement. This command significantly reduces the problem of type errors. This is used extensively because VBA deals with information rich applications in which type errors are common.
Microsoft Excel Tutorial Microsoft Powerpoint Interview Questions Answer :
The reasons which made Microsoft drop its support to VBA are as follows, Microsoft visual basic relies heavily on machine code which was written for Power PC architecture. Also it would take another two years for developing VBA support for its architecture. It also states that Microsoft will incorporate VBA in the next script of office release for Mac.
Answer :
Format functions can be used to format many of the expressions such as currency, time, date, percentages and numbers. These functions are much simpler to use in VBA. User defined date, numeric and string formats are present in many of the applications.
Microsoft Entity Framework Interview Questions Answer :
A computer registry can be used to store configuration settings and application initialization. We can use Getsetting function to read registry settings and save settings function to write registry settings. Application name, section, key, setting, and default are to be specified for registry modifying. It is advisable to know about your computer settings before modifying registry settings.
Microsoft Word Tutorial Answer :
Userforms should be used for complex user input. When an application input has non text as an input it is advisable to use Userforms rather than the input boxes. When you are using Userforms a user can give input any number of times which is not the case when you use input boxes. This can be accessible from the insert menu in your VBA editor after which you can insert your code.
Microsoft Azure Interview Questions Answer :
Visual basic applications have very rich and flexible applications but there is one limitation when using pointer function. Windows API has limited support for function pointers because it has the ability to use but not the functional support to call back the function. But later versions have support for modules. Function pointers have inbuilt support (DLL's) for call but not for call back.
Microsoft Excel Interview QuestionsAnswer :
Visual basic can be used within almost all Microsoft products such as Map point, Visio, Auto cad, Word perfect, ArcGIS, word, excel, etc. With VBA you can control many functions such as host application, menus, toolbars, user interface, import and export of files, data transfer and extraction from multiple interfaces.
Microsoft Powerpoint Tutorial Answer :
The chief use of VBA is to make use of its special function which helps in repeated actions. Goal seek function helps to reduce manual entry of the code each and every time. This solves the problem of repeated function entry by automating functions and actions. Sub routines are inserted into the using the VBA editor and command insert module.
Answer :
Data validation is an important concept in VBA. Application procedure and a custom dialog box can be used to correct input errors. You can assign an application procedure to the frame of a dialog box. Error message or custom dialog box can be highlighted with the first field with errors.
Microsoft Project Interview Questions Answer :
Shell command present in VBA can be used to start the dialer present in windows operating system. Phone number can be used to connect to your modem. With the use of shell and sendkeys you can dial to your user. Shell starts windows application and sendkeys inform the window to dial according to the keystrokes of the application. A macro can be used to start the cardfile program which activates the auto dialer feature.
Microsoft Entity Framework Tutorial Answer :
- ByRef: If you pass an argument by reference when calling a procedure the procedure access to the actual variable in memory. As a result the variable's value can be changed by the procedure.
- ByVal: If you pass an argument by value when calling a procedure the variable's value can be changed with in the procedure only outside the actual value of the variable is retained.
- ByRef is default: Passing by reference is the default in VBA. If you do not explicitly specify to pass an argument by value VBA will pass it by reference.
Excel Data Analysis Interview Questions Answer :
Option Explicit makes the declaration of Variables Mandatory while Option Base used at module level to declare the default lower bound for array subscripts. For eg. Option Base 1 will make the array lower bound as 1 instead of 0.
Microsoft Word Interview Questions Answer :
- The Boolean data type has only two states, True and False. These types of variables are stored as 16-bit (2 Byte) numbers, and are usually used for flags.
- The Byte data type is an 8-bit variable which can store value from 0 to 255.
- The Double data type is a 64-bit floating point number used when high accuracy is needed.
- The Integer data type is a 16-bit number which can range from -32768 to 32767. Integers should be used when you are working with values that can not contain fractional numbers. In case, you're working over 32767 rows use Long as data type.
- The Long data type is a 32-bit number which can range from -2,147,483,648 to 2,147,483,647.
- The Single data type is a 32-bit number ranging from -3.402823e38 to -1.401298e-45 for negative values and from 1.401298e-45 to 3.402823e38 for positive values. When you need fractional numbers within this range, this is the data type to use.
- The String data type is usually used as a variable-length type of variable. A variable-length string can contain up to approximately 2 billion characters. Each character has a value ranging from 0 to 255 based on the ASCII character set.
Microsoft Azure Tutorial Answer :
ThisWorkbook refers to the workbook where code is being written while ActiveWorkbook refers to the workbook which is in active state with active window. In case of only one workbook open, ActiveWorkbook is same as ThisWorkbook.
Excel pivot tables Interview Questions Answer :
Last Row in a column can be find using End(xlUp) and Last Column in a row can be find using End(xlToLeft). For e.g. Range('A1048576').End(xlUp).Row gives last used row of Column A.
Answer :
- Forms controls can be used on worksheets and chart sheets. Forms controls can also be placed within embedded charts in Classic Excel (though not in Excel 2007). ActiveX controls can only be used on worksheets. ActiveX controls do not work in MacExcel.
- The Forms controls aren’t very complicated, and they have been part of Excel for longer (they were used in Excel 5/95’s dialog sheets) than the Controls Toolbox (Excel 97), so it stands to reason that they’d be more seamlessly integrated. Being newer, the ActiveX controls have richer formatting possibilities. Both can link to cells and ranges in the worksheet.
Microsoft Project Tutorial Answer :
- Subroutines never return a value but functions does return values.
- A function could not change the values of actual arguments whereas a subroutine could change them.
Excel Power View Interview Questions Answer :
Using Breakpoints(F9), Step-by-step execution (F8), Debug.Print & Immediate Window and Watch window.
Microsoft Powerpoint Interview Questions Answer :
Application --> Workbooks --> Worksheets --> Range / Chart.
Advanced Excel Charts Tutorial Answer :
There is a option 'Allow users to edit ranges' can be used for this purpose.
Microsoft Interview Questions Answer :
Using 'Data Validation'.
Microsoft Entity Framework Interview Questions Answer :
No one can't. They're fixed as 65536(2^16) in Excel 2003 or before and 1048576(2^20) in Excel 2007 & Excel 2010.
Advanced Excel Functions Tutorial Answer :
No one can't. They're fixed as 256(2^8) in Excel 2003 or before and 16384(2^14) in Excel 2007 & Excel 2010.
Answer :
We can create a workbook which cannot be modified but cannot create a workbook which can't be copied.(It depends on system security, it has nothing to do with Excel or VBA)
Answer :
Excel provides three ways to protect a workbook:
- Require a password to open the workbook.
- Prevent users from adding sheets, deleting sheets, hiding sheets, and unhiding sheets.
- Prevent users from changing the size or position of windows.
Excel Dashboards Tutorial Answer :
Use Application.Dialogs(xlDialogFont).Show or Application.Dialogs(xlDialogFormatFont).Show to load font dialog box from Excel VBA.
Answer :
ADO : ActiveX Data Objects is universal data access framework that encompasses the functionality of DAO.
ODBC : Open Database Connectivity(ODBC) is a windows technology that lets a database client application connect to a external database.
OLEDB : Low level programming interface designed to access a wide variety of data access Object Linking and Embedding (OLE). Microsoft Azure Interview Questions Answer :
Activesheet.PageSetup.PaperSize = xlPaperLetter (Similarly xlPaperA4 or xlPaperLegal etc.).
Answer :
Any of the three methods can be used:
- Create a class with the properties you require to return and then return the object of the class from the function.
- Using ByRef for the values.
- Return an array of the values.
Answer :
Yes because VBA is VB6.0 based which is an Object Based Programming Language and is also known as 'Event Driven Programming' and it supports Polymorphism, Encapsulation and partially Inheritance.
Microsoft Project Interview Questions Answer :
Set Cancel property of Button to True on the Form.
Answer :
Type libraries are files that explicitly describe some or all of the contents of components. This includes information about the methods properties constants and other members exposed by the component. Development tools such as Visual Basic make use of the information contained in the type library to help you as a developer access and use the component. In addition type libraries provide a convenient way to include a simple level of descriptive documentation for component members. You can use them through 'Tools --> References' in VBE.
Answer :
Volatile functions are a type of function that will always recalculate. That means whenever Excel needs to calculate any part of the worksheet, those cells containing volatile functions will also calculate.
Answer :
By adding Application.Volatile statement to it. It must be the first line of your User Defined Function.
Excel Data Analysis Interview Questions Answer :
Actually INDEX is not a volatile function, even though some MicroSoft documentation says it is. Anyway no its not possible to apply Application.Volatile(False) to a built-in Excel function except by duplicating what the built-in function does inside a UDF.
Answer :
- Dependency trees are excel way of minimizing the calculation by tracking what has changed since last calculation. It allows Excel to recalculate only:
- Formulae/Names that have changed.
- Formulae containing Volatile Functions.
- Formulae dependent on changed or volatile formulae or cells or names.
- Excel determines dependencies by looking at the cells referred to by each formula and by the argument list of each function.
- Dependency trees are immediately updated whenever a formula is entered or changed.
- To force the dependency trees to be rebuilt and all formulae calculation use CTRL+ALT+SHIFT+F9.
Excel pivot tables Interview Questions Answer :
using the Application.CalculationState property which tells if calculation has completed ( xlDone ), is pending ( xlPending) , or is in process ( xlCalculating ).
Answer :
There are two limits to the number of dependencies that Excel versions prior to Excel 2007 can track before it must do full calculations instead of recalculations.
- The number of different areas in a sheet that may have dependencies is limited to 65,536.
- The number of cells that may depend on a single area is limited to 8K.
After the workbook has passed these limits, Excel no longer attempts to recalculate only changed cells. Instead, it recalculates all cells at each calculation.
Answer :
VBA is licensed to Microsoft and this compatible with and only Microsoft products. Code written is compiled by an intermediate language called P-code and this is stored in hosting applications such as Excel, Word and Access. The intermediate code is interpreted by a virtual machine. This code and intermediate language is the exclusive right of Microsoft.
Answer :
- The current region is a range bounded by any combination of blank rows and blank columns.
- This property is useful for many operations that automatically expand the selection to include the entire current region, such as the AutoFormat method. This property cannot be used on a protected worksheet.
- The UsedRange property is used to select the range of used cells on a worksheet. It returns a Range object that represents the used range on the specified worksheet.
- Every non-blank cell got its CurrentRegion and its keyboard shortcut is Ctrl+Shift+Spacebar.
- There can be many current regions but there is only one used range in a worksheet.
Answer :
XLM (used in Excel 97 or before) and VBA(used for 2000 and after). Obviously, VBA is in use these days.
Answer :
The area under which the container provides the view of the ActiveX Document is known as a view port.
Answer :
The Variant data type has a numeric storage size of 16 bytes and can contain data up to the range of a Decimal, or a character storage size of 22 bytes (plus string length),and can store any character text.
Answer :
Syntax Errors, Runtime , Logic.
Answer :
Yes.
Answer :
Predefined, Custom, User Defined.
Answer :
Public, private, Friend.
Answer :
Set Value is assigned to ActiveX Object from the form. Let Value is retried to ActiveX Object from the form. Get- Assigns the value of an expression to a variable or property.
Answer :
Field, Form.
Answer :
Messaging Application programming Interface.
Answer :
Simple Single Select , Extended, Multiple Select.
Answer :
DCOMCONFIG.EXE.
Answer :
The Controls which do not have Align property can't be placed on MDI Form.
Answer :
Vbrun300.dll.
Answer :
The Parameters collection.
Answer :
Database Pooling, Transactional operations, Deployment, Security, Remote Execution.
The intent of MockQuestions.com is for our users to build confidence for their job interview, by using our thousands of interview questions and answers as they practice and prepare for their interview. We believe, most of our visitors can become more likely to succeed in their job interview with hard-work and practice. MS Access VBA Interview Questions and Answers with Examples. MS Access VBA Interview Questions and Answers explained with Example macros. Here are the list of most frequently asked basic MS Access VBA interview questions. All the questions are answered with simple examples.
Dear readers, these VB.NET Interview Questions have been designed specially to get you acquainted with the nature of questions you may encounter during your interview for the subject of VB.NET Language. As per my experience good interviewers hardly plan to ask any particular question during your interview, normally questions start with some basic concept of the subject and later they continue based on further discussion and what you answer:
Visual Basic .NET (VB.NET) is an object-oriented computer programming language implemented on the .NET Framework. Although it is an evolution of classic Visual Basic language, it is not backwards-compatible with VB6, and any code written in the old version does not compile under VB.NET.
Sub Main indicates the entry point of VB.Net program.
Shared methods or static methods can be invoked without creating an object of the class.
Shared declares a shared variable, which is not associated with any specific instance of a class or structure, rather available to all the instances of the class or structure.
Shadows indicate that the variable re-declares and hides an identically named element, or set of overloaded elements, in a base class.
Static indicates that the variable will retain its value, even when the after termination of the procedure in which it is declared.
In VB.Net, constants are declared using the Const statement. The Const statement is used at module, class, structure, procedure, or block level for use in place of literal values.
Ansi − Specifies that Visual Basic should marshal all strings to American National Standards Institute (ANSI) values regardless of the name of the external procedure being declared.
Assembly − Specifies that an attribute at the beginning of a source file applies to the entire assembly.
Async − Indicates that the method or lambda expression that it modifies is asynchronous. Such methods are referred to as async methods. The caller of an async method can resume its work without waiting for the async method to finish.
Auto − The charsetmodifier part in the Declare statement supplies the character set information for marshaling strings during a call to the external procedure. It also affects how Visual Basic searches the external file for the external procedure name. The Auto modifier specifies that Visual Basic should marshal strings according to .NET Framework rules.
ByRef − Specifies that an argument is passed by reference, i.e., the called procedure can change the value of a variable underlying the argument in the calling code. It is used under the contexts of −
Declare Statement
Function Statement
Sub Statement
ByVal − Specifies that an argument is passed in such a way that the called procedure or property cannot change the value of a variable underlying the argument in the calling code. It is used under the contexts of −
Declare Statement
Function Statement
Operator Statement
Property Statement
Sub Statement
Default − Identifies a property as the default property of its class, structure, or interface.
Friend − Specifies that one or more declared programming elements are accessible from within the assembly that contains their declaration, not only by the component that declares them.
Friend access is often the preferred level for an application's programming elements, and Friend is the default access level of an interface, a module, a class, or a structure.
In − It is used in generic interfaces and delegates.
Iterator − Specifies that a function or Get accessor is an iterator. An iterator performs a custom iteration over a collection.
Key − The Key keyword enables you to specify behavior for properties of anonymous types.
Module − Specifies that an attribute at the beginning of a source file applies to the current assembly module. It is not same as the Module statement.
MustInherit − Specifies that a class can be used only as a base class and that you cannot create an object directly from it.
MustOverride − Specifies that a property or procedure is not implemented in this class and must be overridden in a derived class before it can be used.
Narrowing − Indicates that a conversion operator (CType) converts a class or structure to a type that might not be able to hold some of the possible values of the original class or structure.
NotInheritable − Specifies that a class cannot be used as a base class.
NotOverridable − Specifies that a property or procedure cannot be overridden in a derived class.
Optional − Specifies that a procedure argument can be omitted when the procedure is called.
Out − For generic type parameters, the Out keyword specifies that the type is covariant.
Overloads − Specifies that a property or procedure redeclares one or more existing properties or procedures with the same name.
Overridable − Specifies that a property or procedure can be overridden by an identically named property or procedure in a derived class.
Overrides − Specifies that a property or procedure overrides an identically named property or procedure inherited from a base class.
ParamArray − ParamArray allows you to pass an arbitrary number of arguments to the procedure. A ParamArray parameter is always declared using ByVal.
Partial − Indicates that a class or structure declaration is a partial definition of the class or structure.
Private − Specifies that one or more declared programming elements are accessible only from within their declaration context, including from within any contained types.
Protected − Specifies that one or more declared programming elements are accessible only from within their own class or from a derived class.
Public − Specifies that one or more declared programming elements have no access restrictions.
ReadOnly − Specifies that a variable or property can be read but not written.
Shadows − Specifies that a declared programming element redeclares and hides an identically named element, or set of overloaded elements, in a base class.
Shared − Specifies that one or more declared programming elements are associated with a class or structure at large, and not with a specific instance of the class or structure.
Static − Specifies that one or more declared local variables are to continue to exist and retain their latest values after termination of the procedure in which they are declared.
Unicode − Specifies that Visual Basic should marshal all strings to Unicode values regardless of the name of the external procedure being declared.
Widening − Indicates that a conversion operator (CType) converts a class or structure to a type that can hold all possible values of the original class or structure.
WithEvents − Specifies that one or more declared member variables refer to an instance of a class that can raise events.
WriteOnly − Specifies that a property can be written but not read.
Dim Statement − Declares and allocates storage space for one or more variables.
Const Statement − Declares and defines one or more constants.
Enum Statement − Declares an enumeration and defines the values of its members.
Class Statement − Declares the name of a class and introduces the definition of the variables, properties, events, and procedures that the class comprises.
Structure Statement − Declares the name of a structure and introduces the definition of the variables, properties, events, and procedures that the structure comprises.
Module Statement − Declares the name of a module and introduces the definition of the variables, properties, events, and procedures that the module comprises.
Interface Statement − Declares the name of an interface and introduces the definitions of the members that the interface comprises.
Function Statement − Declares the name, parameters, and code that define a Function procedure.
Sub Statement − Declares the name, parameters, and code that define a Sub procedure.
Declare Statement − Declares a reference to a procedure implemented in an external file.
Operator Statement − Declares the operator symbol, operands, and code that define an operator procedure on a class or structure.
Property Statement − Declares the name of a property, and the property procedures used to store and retrieve the value of the property.
Delegate Statement − Used to declare a delegate.
The VB.Net compiler directives give instructions to the compiler to preprocess the information before actual compilation starts. All these directives begin with #, and only white-space characters may appear before a directive on a line. These directives are not statements.
Await − It is applied to an operand in an asynchronous method or lambda expression to suspend execution of the method until the awaited task completes.
GetType − It returns a Type object for the specified type. The Type object provides information about the type such as its properties, methods, and events.
Function Expression − It declares the parameters and code that define a function lambda expression.
If − It uses short-circuit evaluation to conditionally return one of two values. The If operator can be called with three arguments or with two arguments.
Exit statement − Terminates the loop or select case statement and transfers execution to the statement immediately following the loop or select case.
Continue statement − Causes the loop to skip the remainder of its body and immediately retest its condition prior to reiterating.
GoTo statement − Transfers control to the labeled statement. Though it is not advised to use GoTo statement in your program.
Dynamic arrays are arrays that can be dimensioned and re-dimensioned as par the need of the program. You can declare a dynamic array using the ReDim statement.
A Jagged array is an array of arrays. A Jagged array is an array of arrays. The follwoing code shows declaring a jagged array named scores of Integers:
It represents ordered collection of an object that can be indexed individually. It is basically an alternative to an array. However, unlike array, you can add and remove items from a list at a specified position using an index and the array resizes itself automatically. It also allows dynamic memory allocation, add, search and sort items in the list.
It uses a key to access the elements in the collection. A hash table is used when you need to access elements by using key, and you can identify a useful key value. Each item in the hash table has a key/value pair. The key is used to access the items in the collection.
It uses a key as well as an index to access the items in a list. A sorted list is a combination of an array and a hash table. It contains a list of items that can be accessed using a key or an index. If you access items using an index, it is an ArrayList, and if you access items using a key, it is a Hashtable. The collection of items is always sorted by the key value.
It represents a last-in, first out collection of object. It is used when you need a last-in, first-out access of items. When you add an item in the list, it is called pushing the item, and when you remove it, it is called popping the item.
It represents a first-in, first out collection of object. It is used when you need a first-in, first-out access of items. When you add an item in the list, it is called enqueue, and when you remove an item, it is called deque.
It represents an array of the binary representation using the values 1 and 0. It is used when you need to store the bits but do not know the number of bits in advance. You can access items from the BitArray collection by using an integer index, which starts from zero.
In VB.Net, a function can return a value to the calling code in two ways −
By using the return statement.
By assigning the value to the function name.
By using the params keyword, a method parameter can be specified which takes a variable number of arguments or even no argument.
No! additional parameters are not permitted after the params keyword in a method declaration. Only one params keyword is allowed in a method declaration.
VB.NET exceptions are represented by classes. The exception classes in VB.NET are mainly directly or indirectly derived from the System.Exception class. Some of the exception classes derived from the System.Exception class are the System.ApplicationException and System.SystemException classes.
The System.ApplicationException class supports exceptions generated by application programs. Hence the exceptions defined by the programmers should derive from this class. The System.SystemException class is the base class for all predefined system exception.
The stream is basically the sequence of bytes passing through the communication path. There are two main streams: the input stream and the output stream. The input stream is used for reading data from file (read operation) and the output stream is used for writing into the file (write operation).
The FileStream class in the System.IO namespace helps in reading from, writing to and closing files. This class derives from the abstract class Stream.
The StreamReader class inherits from the abstract base class TextReader that represents a reader for reading series of characters. It is used for reading from text files.
The StreamWriter class inherits from the abstract class TextWriter that represents a writer, which can write a series of character. It is used for writing to text files.
The BinaryReader class is used to read binary data from a file. A BinaryReader object is created by passing a FileStream object to its constructor. The BinaryReader class is used for reading from a binary file.
The BinaryWriter class is used to write binary data to a stream. A BinaryWriter object is created by passing a FileStream object to its constructor. The BinaryWriter class is used for writing to a binary file.
The DirectoryInfo class is derived from the FileSystemInfo class. It has various methods for creating, moving, and browsing through directories and subdirectories. This class cannot be inherited.
The FileInfo class is derived from the FileSystemInfo class. It has properties and instance methods for creating, copying, deleting, moving, and opening of files, and helps in the creation of FileStream objects. This class cannot be inherited.
Every Visual Basic control consists of three important elements −
Properties − Describes the object.
Methods − Cause an object to do something.
Events − Happens when an object does something.
It represents the container for all the controls that make up the user interface.
It represents a standard Windows label.
It represents a Windows control to display a list of items.
It enables the user to select a single option from a group of choices when paired with other RadioButton controls.
It represents a Windows picture box control for displaying an image.
It Implements the basic functionality of a scroll bar control.
It represents a Windows control that allows the user to select a date and a time and to display the date and time with a specified format.
It displays a hierarchical collection of labeled items, each represented by a TreeNode.
It represents a Windows list view control, which displays a collection of items that can be displayed using one of four different views.
What is Next ?
Further you can go through your past assignments you have done with the subject and make sure you are able to speak confidently on them. If you are fresher then interviewer does not expect you will answer very complex questions, rather you have to make your basics concepts very strong.
Second it really doesn't matter much if you could not answer few questions but it matters that whatever you answered, you must have answered with confidence. So just feel confident during your interview. We at tutorialspoint wish you best luck to have a good interviewer and all the very best for your future endeavor. Cheers :-)