View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Juan Pablo González Juan Pablo González is offline
external usenet poster
 
Posts: 226
Default Extracting data type from variable

Check out either TypeOf or TypeName()

--
Regards

Juan Pablo González

"ExcelMonkey" wrote in message
...

Is is possible to extract the data type of a variable? For example lets
say I have two variables X and Y

Dim X as Comment
Dim Y as Range

I now want to evalute what data type X is. Is their a property for
type?

IF X.Type = Comment Then

etc


--
ExcelMonkey
------------------------------------------------------------------------
ExcelMonkey's Profile:

http://www.excelforum.com/member.php...fo&userid=5221
View this thread: http://www.excelforum.com/showthread...hreadid=276807