Object Data Type in Excel VBA explained with syntax and examples. An object consists of reference to an object. It occupies 4 bytes (32 bits) in memory. We use Set statement for a convenient way to refer an object.
Let us see Data Type Object Syntax in Excel VBA.
Dim VariableName as Object
Where VariableName represents the name of the variable.
and Object represents the type of data.
Here is an example on the Data Type Object in Excel VBA.
Sub VBAF1_Object_DataType() 'Integer Variable Declaration Dim wWorkbook As Object Set wWorkbook = Workbooks.Add End Sub
VBA Data Types
Also read about all other data types.