A macro code to print multiple sheets in different w.books
Jim one more thing: when i hit Cancel while printing it shows an error
message asking for End or Debug. What do i do to make it not show the message
but do Cancel printing? Below is what i have in the module. Thanks again.
Sub PrintSheets()
Sheets("Original Materials").Select
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
Sheets("Original Equipment").Select
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
Sheets("Original ODC").Select
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
Sheets("DATA").Select
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
ChDir "C:\Shank"
Workbooks.Open Filename:="C:\Shank\Detailed Cost Report Current.xls"
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
ActiveWindow.Close
Workbooks.Open Filename:="C:\Shank\Current Perstat.xls"
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
Sheets("Afghan Employee").Select
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
ActiveWindow.Close
End Sub
"Gladiator" wrote:
Jim, thanks for your response. Can you please tell me where do i insert a
code (and what code) to show a message box that asks where i want to proceed
with printing or no, like Yes or No message box? thanks.
"Jim Thomlinson" wrote:
Have you tried recording a macro where you open the other books and print the
appropriate sheets? That would be a good place to start...
--
HTH...
Jim Thomlinson
"Gladiator" wrote:
Hi, i know i am not supposed to post the question twice, but could not get e
reply on that forum. Sorry in advance. below is my question:
Hi there, can anyone help me with the codes to get a macro to print local
wbook sheets along with the several sheets in other workbooks? I was able to
record a macro to print worksheets in the local workbook, but how do i make
the same macro to print the worksheets in three more different workbooks with
multiple worksheets in them? Thanks in advance?
|