View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
manxman manxman is offline
external usenet poster
 
Posts: 26
Default Pause a macro after each line, run next after hitting spacebar?

I want the following macro to stop after each line and wait for me to hit the
spacebar before entering the next line. What code do I need to add?

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