
We can divide the VBA data types into two categories: We can change the variables during the execution of the program. Variables are the data types that are used to hold a value. Variables, Constant and Operators in VBA Variables

A variant variable can hold any type of value. Declare the variable name and keep the type variant.To add the InputBox to your command button, execute the following steps: The InputBox function prompts the user to enter the values and returns the information entered in the dialog box. Now, when you click on the button, you will get the following message. To create a MsgBox, add the following lines of code to the command button.


The MsgBox is a dialog box in Excel that will prompt a message on your worksheet.
