Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
debug.print x
This will print the variable x to the immediate window. -- Ian -- "Barb Reinhardt" wrote in message ... 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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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" wrote in message ... 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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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" wrote in message ... 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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
In the VBE
In the menu, select View, then Immediate Window (or do Ctrl+G) -- Regards, Tom Ogilvy "Barb Reinhardt" wrote in message ... 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" wrote in message ... 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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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" wrote in message ... 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" wrote in message ... 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 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
if, then display message | Excel Discussion (Misc queries) | |||
Display a message | Excel Worksheet Functions | |||
Display a message | Excel Worksheet Functions | |||
How do I display a message when a cell has a certain value?? | Excel Discussion (Misc queries) | |||
How to display a message box | Excel Programming |