Results 1 to 7 of 7
  1. #1
    New Lounger
    Join Date
    Nov 2004
    Location
    Sacramento, California, USA
    Posts
    21
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Displaying a variable value (Excel 2000)

    I have a counter in a program called 'Quickcount'. At the end of the procedure, I want to display a message box that shows the value in 'Quickcount'. Based on a book I am reading, I:
    Set Dsplycount as Interger
    Run the program that gives 'Quickcount' a value
    Set Dsplycount = Quickcount
    Displycount.visible

    The error I am encountering is at the 'Set Dsplycount', but I am not sure about the rest, either. At the end of the program, Quickcount is accurate.

    Any ideas?

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Displaying a variable value (Excel 2000)

    Set is only used for object variables (such as a Workbook, or a Range), but not for numeric or string variables. And since a numeric or string variable is not an object, it has no properties such as Visible. Try this:

    MsgBox QuickCount

  3. #3
    WS Lounge VIP rory's Avatar
    Join Date
    Dec 2000
    Location
    Burwash, East Sussex, United Kingdom
    Posts
    6,280
    Thanks
    3
    Thanked 191 Times in 177 Posts

    Re: Displaying a variable value (Excel 2000)

    Hi,
    Assuming that Quickcount is a variable (which is not clear from your post), you would just use something like:
    <code>MsgBox Quickcount</code>

    HTH
    Regards,
    Rory

    Microsoft MVP - Excel

  4. #4
    New Lounger
    Join Date
    Nov 2004
    Location
    Sacramento, California, USA
    Posts
    21
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Displaying a variable value (Excel 2000)

    That worked great...and was way to easy. Thanks.

    Also, I ready today about # 50,000. Congratulations. I know that I have received help many times from you...so I guess I played a role in helping you get there. Also, seconds after this post came in, another came from Rory - here is to you still frustrating people for a long time.

    thanks for all the help.

  5. #5
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Displaying a variable value (Excel 2000)

    Thanks, DSNYBND!

  6. #6
    WS Lounge VIP rory's Avatar
    Join Date
    Dec 2000
    Location
    Burwash, East Sussex, United Kingdom
    Posts
    6,280
    Thanks
    3
    Thanked 191 Times in 177 Posts

    Re: Displaying a variable value (Excel 2000)

    You get used to being beaten to the punch by Hans after a while! <img src=/S/grin.gif border=0 alt=grin width=15 height=15>
    Regards,
    Rory

    Microsoft MVP - Excel

  7. #7
    New Lounger
    Join Date
    Nov 2004
    Location
    Sacramento, California, USA
    Posts
    21
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Displaying a variable value (Excel 2000)

    It was only seconds. He better keep on his toes. Thanks for the help.

Posting Permissions

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