View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Teak[_2_] Teak[_2_] is offline
external usenet poster
 
Posts: 3
Default How to put in a warning?


How do I put in a warning in the macro below, like:
"Is the printer ready?" and pause for an answer.
If "yes", macro continues
If "No", abort.

Thank you.

Sub PrintWithPgNumInTitleRow()
Dim NumPages As Long, Pg As Long
NumPages = ExecuteExcel4Macro("Get.document(50)")
ActiveSheet.Range("TotalPages").Value = NumPages
For Pg = 1 To NumPages
With ActiveSheet
.Range("PageNum").Value = Pg
.PrintOut from:=Pg, to:=Pg
End With
Next Pg
End Sub