LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 24
Default 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?

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
multiple sheets 2 work books capt c Excel Worksheet Functions 0 April 8th 09 03:03 PM
can anyone help with the code for creating a aut print macro... des-sa[_2_] Excel Discussion (Misc queries) 1 May 17th 08 01:01 PM
Help on VBA Code to populate multiple sheets [email protected] Excel Discussion (Misc queries) 1 January 15th 08 04:40 AM
Counting dates in multiple work sheets and work books Savage Excel Discussion (Misc queries) 0 December 19th 05 11:41 PM
VBA Code To have a macro repeat on all sheets in a workbook carl Excel Worksheet Functions 3 November 3rd 05 07:48 PM


All times are GMT +1. The time now is 09:50 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"