Thread: Dim
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 6,953
Default Dim

that is a form of implicit typing

? typename(msg)
Empty '<== means it is an uninitialized variant
? typename(msg1$)
String

so
Dim msg ' declares it as variant
Dim msg$ ' declares it as String
Dim msg& ' declares it as Long
Dim msg! 'declares it as Single
Dim msg# 'declares it as double
Dim msg% 'declares it as Integer

--
Regards,
Tom Ogilvy


"Steph" wrote:

Hi. I'm getting familiar with code that someone else wrote, and ran across
something I have never seen before. What is the difference between:
Dim Msg
Dim Msg$
What does the $ do? Thanks!