Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 26
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 26
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro code to put series name next to individual line in line grap Otani Charts and Charting in Excel 3 February 23rd 10 07:24 PM
Getting line on line chart to display after creation from Pivot Table dcsi_jim Charts and Charting in Excel 8 February 6th 07 08:54 PM
Use VBA code to display message if combobox selection not in list hurlbut777 Excel Programming 4 December 29th 05 11:36 PM
Code to make a New line in a message John Parham Excel Programming 2 September 18th 03 07:46 PM
UserForm - display text message then run code Robert[_13_] Excel Programming 3 September 13th 03 11:37 AM


All times are GMT +1. The time now is 10:24 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"