+ Reply to Thread
Results 1 to 4 of 4

Meaning of characters in %, !, $ and # in variable declaration

  1. #1
    Registered User
    Join Date
    04-16-2013
    Location
    Amersfoort, The Netherlands
    MS-Off Ver
    Excel 2010
    Posts
    2

    Meaning of characters in %, !, $ and # in variable declaration

    Hello all,

    This is my first time on this forum since normally I figure out a lot myself, but this time I can't. Does anybody know the meaning of the use of the characters %, !, $ and # in in variable declaration. I have inherited an Excel sheet with lots of VBA code in which many variables are declared with these characters, but I have no idea what this does. E.g.:

    Dim j%, k%, kRow%, kCol%, colOff%
    Dim fireRate%, hazDis!, pEscX!, pEsc!, pInc!, zFireType$, sRating$
    Dim d2s#, tCx!, tCy!, thetaC!, xl!, yl!

    He also uses '#' in a formula:
    ir = f/t/2#, for which I also don't know what the # does.

    Does any of you know what these characters do?

    Many thanks for your help.

  2. #2
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,461

    Re: Meaning of characters in %, !, $ and # in variable declaration

    Those are type declarations, a form of short hand.
    The only one I ever remember is String $

    http://support.microsoft.com/kb/191713?wa=wsignin1.0
    Cheers
    Andy
    www.andypope.info

  3. #3
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Meaning of characters in %, !, $ and # in variable declaration

    Integer(%),Long(&),Double(#)

  4. #4
    Registered User
    Join Date
    04-16-2013
    Location
    Amersfoort, The Netherlands
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: Meaning of characters in %, !, $ and # in variable declaration

    :D Thanks guys!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1