{"id":4863,"date":"2016-12-09T06:23:15","date_gmt":"2016-12-09T06:23:15","guid":{"rendered":"http:\/\/www.learnexcelmacro.com\/wp\/?p=4863"},"modified":"2022-08-12T11:14:03","modified_gmt":"2022-08-12T11:14:03","slug":"get-type-of-data-stored-in-a-variable","status":"publish","type":"post","link":"https:\/\/vmlogger.com\/excel\/2016\/12\/get-type-of-data-stored-in-a-variable\/","title":{"rendered":"get Data Type of Variable in VBA – VarType() VBA function"},"content":{"rendered":"
Dear Friends,
\nSome time during the VBA programming you may need to perform different action based on “what is the type of the variable” you are dealing with. Or in other words what kind of data is stored in a variable. In VBA, if you have not defined type of a variable while declaring it using “Dim statement”, then whatever value you assign to that variable, data type of the value is inherited by the variable.
\n