+ Reply to Thread
Results 1 to 6 of 6

terminal & on constant value

  1. #1
    Registered User
    Join Date
    01-13-2020
    Location
    usa
    MS-Off Ver
    office 365
    Posts
    15

    terminal & on constant value

    Public Const C_ERR_NO_ERROR = 0&

    What is the & for?

    Thank you

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,091

    Re: terminal & on constant value

    See https://stackoverflow.com/questions/...le-name-in-vba

    What are possible suffixes after variable name in VBA?

    Here is snip:

    Dim A!, B@, C#, D$, E%, F&
    Debug.Print "A! - " & TypeName(A)
    Debug.Print "B@ - " & TypeName(B)
    Debug.Print "C# - " & TypeName(C)
    Debug.Print "D$ - " & TypeName(D)
    Debug.Print "E% - " & TypeName(E)
    Debug.Print "F& - " & TypeName(F)
    Outputs

    A! - Single
    B@ - Currency
    C# - Double
    D$ - String
    E% - Integer
    F& - Long
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: terminal & on constant value

    The & is short hand for declaring a variable of type Long.
    If posting code please use code tags, see here.

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,091

    Re: terminal & on constant value

    Note that, if you read that thread, their use is not recommended

  5. #5
    Registered User
    Join Date
    01-13-2020
    Location
    usa
    MS-Off Ver
    office 365
    Posts
    15

    Re: terminal & on constant value

    Thanks all. xoxox

  6. #6
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,091

    Re: terminal & on constant value

    You're welcome. Thanks for the rep.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Indicate min priority of identical terminal in the same day
    By hessam.p in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 12-05-2019, 03:38 PM
  2. Extract POS- Terminal Numebrs
    By suhabthan in forum Excel General
    Replies: 5
    Last Post: 09-19-2018, 03:31 AM
  3. Replies: 0
    Last Post: 11-11-2015, 04:26 AM
  4. Retrieving data from Bloomberg Terminal
    By drktle in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-23-2014, 08:23 PM
  5. Add in on Terminal Server
    By tcdake in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-08-2007, 11:20 AM
  6. Terminal Digits
    By Cheryl B in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 12-29-2005, 11:50 AM
  7. Embedded Terminal Services
    By amullen in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-14-2005, 01:12 PM

Tags for this Thread

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