+ Reply to Thread
Results 1 to 6 of 6

Message Display

  1. #1
    Barb Reinhardt
    Guest

    Message Display

    I'd like to display the results calculated within a macro in a message box in
    order to debug the code. How would I do this? Alternatively, is there a
    better way to do this?

    Thanks,
    Barb Rienhardt

  2. #2
    Ian
    Guest

    Re: Message Display

    debug.print x

    This will print the variable x to the immediate window.

    --
    Ian
    --
    "Barb Reinhardt" <[email protected]> wrote in message
    news:[email protected]...
    > I'd like to display the results calculated within a macro in a message box
    > in
    > order to debug the code. How would I do this? Alternatively, is there a
    > better way to do this?
    >
    > Thanks,
    > Barb Rienhardt




  3. #3
    Barb Reinhardt
    Guest

    Re: Message Display

    Um ... what is the immediate window. I added it and see nothing.

    "Ian" wrote:

    > debug.print x
    >
    > This will print the variable x to the immediate window.
    >
    > --
    > Ian
    > --
    > "Barb Reinhardt" <[email protected]> wrote in message
    > news:[email protected]...
    > > I'd like to display the results calculated within a macro in a message box
    > > in
    > > order to debug the code. How would I do this? Alternatively, is there a
    > > better way to do this?
    > >
    > > Thanks,
    > > Barb Rienhardt

    >
    >
    >


  4. #4
    Dave Peterson
    Guest

    Re: Message Display

    You could use:
    msgbox X
    sprinkled throughout your code.

    Next time you're in the VBE, hit ctrl-g. You'll see the immediate window.

    It's nice to show things there--so you don't have to dismiss each msgbox.



    Barb Reinhardt wrote:
    >
    > Um ... what is the immediate window. I added it and see nothing.
    >
    > "Ian" wrote:
    >
    > > debug.print x
    > >
    > > This will print the variable x to the immediate window.
    > >
    > > --
    > > Ian
    > > --
    > > "Barb Reinhardt" <[email protected]> wrote in message
    > > news:[email protected]...
    > > > I'd like to display the results calculated within a macro in a message box
    > > > in
    > > > order to debug the code. How would I do this? Alternatively, is there a
    > > > better way to do this?
    > > >
    > > > Thanks,
    > > > Barb Rienhardt

    > >
    > >
    > >


    --

    Dave Peterson

  5. #5
    Tom Ogilvy
    Guest

    Re: Message Display

    In the VBE

    In the menu, select View, then Immediate Window

    (or do Ctrl+G)

    --
    Regards,
    Tom Ogilvy

    "Barb Reinhardt" <[email protected]> wrote in message
    news:[email protected]...
    > Um ... what is the immediate window. I added it and see nothing.
    >
    > "Ian" wrote:
    >
    > > debug.print x
    > >
    > > This will print the variable x to the immediate window.
    > >
    > > --
    > > Ian
    > > --
    > > "Barb Reinhardt" <[email protected]> wrote in

    message
    > > news:[email protected]...
    > > > I'd like to display the results calculated within a macro in a message

    box
    > > > in
    > > > order to debug the code. How would I do this? Alternatively, is

    there a
    > > > better way to do this?
    > > >
    > > > Thanks,
    > > > Barb Rienhardt

    > >
    > >
    > >




  6. #6
    Bob Phillips
    Guest

    Re: Message Display

    Barb,

    In the VBIDE, hit Ctrl-G, you will see a small window pop-up. You can output
    to this window i your code, using Debug.Print, or you can test something
    directly in that window, using the ? operator, like breaking at a point in
    the code and typing

    ?myVar

    will display the current value of myVar

    --

    HTH

    RP
    (remove nothere from the email address if mailing direct)


    "Barb Reinhardt" <[email protected]> wrote in message
    news:[email protected]...
    > Um ... what is the immediate window. I added it and see nothing.
    >
    > "Ian" wrote:
    >
    > > debug.print x
    > >
    > > This will print the variable x to the immediate window.
    > >
    > > --
    > > Ian
    > > --
    > > "Barb Reinhardt" <[email protected]> wrote in

    message
    > > news:[email protected]...
    > > > I'd like to display the results calculated within a macro in a message

    box
    > > > in
    > > > order to debug the code. How would I do this? Alternatively, is

    there a
    > > > better way to do this?
    > > >
    > > > Thanks,
    > > > Barb Rienhardt

    > >
    > >
    > >




+ 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