thanks a lot... it works now.. u guys are the best.
Rick Rothstein (MVP -
VB) wrote:
You would put the code lines in front so it would look like this...
Sub Your Macro()
'
' Any lines of code you may have above the printout line
'
Continue = MsgBox("Are you sure you want to print it?", vbYesNo)
If Continue = vbNo Then Exit Sub
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
End Sub
Not what will happen is the macro you are running will stop running if the
user answers No. If you have other code after this and the printing is only
one of many statements, then you should code it like this...
Sub Your Macro()
'
' Any lines of code you may have above the printout line
'
Continue = MsgBox("Are you sure you want to print it?", vbYesNo)
If Continue = vbYes Then
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
End If
'
' The rest of your code goes here
'
End Sub
Rick
hi.. i am sorry i not very god a macro.. i am still in learning stsge.
could you tel me if i have to paste the below command in macro before are
[quoted text clipped - 18 lines]
can any one help me with this please.