Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Display message box after each line of code?
How would I call for a message box to be displayed after each line of code in
the macro below? The purpose is only to halt the macro until I tell it to proceed to the next line. Sub Optimize() ' ' Optimize Macro ' Run through series of percentages ' ' Keyboard Shortcut: Ctrl+Shift+O ' Application.Run "PERSONAL.XLS!MoveCursorNot" ActiveCell.FormulaR1C1 = "0.0001" ActiveCell.FormulaR1C1 = "0.0002" ActiveCell.FormulaR1C1 = "0.0003" ActiveCell.FormulaR1C1 = "0.0004" ActiveCell.FormulaR1C1 = "0.0005" End Sub |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Display message box after each line of code?
Sub Optimize()
' ' Optimize Macro ' Run through series of percentages ' ' Keyboard Shortcut: Ctrl+Shift+O ' Application.Run "PERSONAL.XLS!MoveCursorNot" Msgbox "Hit any key to continue" ActiveCell.FormulaR1C1 = "0.0001" Msgbox "Hit any key to continue" ActiveCell.FormulaR1C1 = "0.0002" Msgbox "Hit any key to continue" ActiveCell.FormulaR1C1 = "0.0003" Msgbox "Hit any key to continue" ActiveCell.FormulaR1C1 = "0.0004" Msgbox "Hit any key to continue" ActiveCell.FormulaR1C1 = "0.0005" End Sub -- HTH Bob Phillips (remove nothere from email address if mailing direct) "manxman" wrote in message ... How would I call for a message box to be displayed after each line of code in the macro below? The purpose is only to halt the macro until I tell it to proceed to the next line. Sub Optimize() ' ' Optimize Macro ' Run through series of percentages ' ' Keyboard Shortcut: Ctrl+Shift+O ' Application.Run "PERSONAL.XLS!MoveCursorNot" ActiveCell.FormulaR1C1 = "0.0001" ActiveCell.FormulaR1C1 = "0.0002" ActiveCell.FormulaR1C1 = "0.0003" ActiveCell.FormulaR1C1 = "0.0004" ActiveCell.FormulaR1C1 = "0.0005" End Sub |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Display message box after each line of code?
Thank you very much. That does the trick.
"Bob Phillips" wrote: Sub Optimize() ' ' Optimize Macro ' Run through series of percentages ' ' Keyboard Shortcut: Ctrl+Shift+O ' Application.Run "PERSONAL.XLS!MoveCursorNot" Msgbox "Hit any key to continue" ActiveCell.FormulaR1C1 = "0.0001" Msgbox "Hit any key to continue" ActiveCell.FormulaR1C1 = "0.0002" Msgbox "Hit any key to continue" ActiveCell.FormulaR1C1 = "0.0003" Msgbox "Hit any key to continue" ActiveCell.FormulaR1C1 = "0.0004" Msgbox "Hit any key to continue" ActiveCell.FormulaR1C1 = "0.0005" End Sub -- HTH Bob Phillips (remove nothere from email address if mailing direct) "manxman" wrote in message ... How would I call for a message box to be displayed after each line of code in the macro below? The purpose is only to halt the macro until I tell it to proceed to the next line. Sub Optimize() ' ' Optimize Macro ' Run through series of percentages ' ' Keyboard Shortcut: Ctrl+Shift+O ' Application.Run "PERSONAL.XLS!MoveCursorNot" ActiveCell.FormulaR1C1 = "0.0001" ActiveCell.FormulaR1C1 = "0.0002" ActiveCell.FormulaR1C1 = "0.0003" ActiveCell.FormulaR1C1 = "0.0004" ActiveCell.FormulaR1C1 = "0.0005" End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Macro code to put series name next to individual line in line grap | Charts and Charting in Excel | |||
Getting line on line chart to display after creation from Pivot Table | Charts and Charting in Excel | |||
Use VBA code to display message if combobox selection not in list | Excel Programming | |||
Code to make a New line in a message | Excel Programming | |||
UserForm - display text message then run code | Excel Programming |