View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
SandyUK[_30_] SandyUK[_30_] is offline
external usenet poster
 
Posts: 1
Default Confirmation box


Here is my Before Print sub which uses a Message Box to make sure tha
the user has updated the weekly data before they print the report no
sure what your macro is doing but by changing the workbook event o
adapting the code it should be what you need or at least a step in th
right direction

Private Sub Workbook_BeforePrint(Cancel As Boolean)

Dim wk As Worksheet
Dim Config As Integer
Dim Ans As Integer

For Each wk In Worksheets
wk.Calculate
Next

Config = vbYesNo + vbQuestion + vbDefaultButton1
Ans = MsgBox("Have you updated the weekly data?", Config, "Ensur
correct data")

If Ans = vbNo Then Cancel = True

If Ans = vbYes Then Cancel = False

End Sub

Regards

Adria

--
SandyU
-----------------------------------------------------------------------
SandyUK's Profile: http://www.excelforum.com/member.php...fo&userid=1748
View this thread: http://www.excelforum.com/showthread.php?threadid=57171