+ Reply to Thread
Results 1 to 5 of 5

meaning of % character?

  1. #1
    Forum Contributor
    Join Date
    08-09-2005
    MS-Off Ver
    2003 & 2007
    Posts
    111

    meaning of % character?

    What does the percent character (%) mean in the following code excerpt?

    Please Login or Register  to view this content.
    (code sampled from http://www.vbaexpress.com/kb/getarticle.php?kb_id=275)
    Last edited by dlh; 07-13-2008 at 08:53 PM.

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258
    Hello dlh,

    The percent sign is the type declaration for an integer variable (16 bit).

    Sincerely,
    Leith Ross

  3. #3
    Forum Contributor
    Join Date
    08-09-2005
    MS-Off Ver
    2003 & 2007
    Posts
    111
    So it's equivalent to "As Integer". Thank you!

  4. #4
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258
    Hello dlh,

    You can explicitly declare a variable using Dim or implicitly by using the data type character. Long integers (32 bit) use &, Single precision use !, and Double precision use #, Currency uses @.

    Sincerely,
    Leith Ross

  5. #5
    Forum Contributor
    Join Date
    10-01-2007
    Posts
    101
    when would you declare an OleObject or a QueryTable? I am currently on a "declaring variables" trip, and am searching for info on when and what to declare at all times. I use QueryTables which I assume are related to database objects.
    thanks.

+ 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