Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
lschuh
 
Posts: n/a
Default

I am trying to add a new question but can not get anywhere.
I have a spreadsheet that you input a date and the data appears. What I
want to do is goto cell I1 insert the first date of the month, print range
a1:j56. Then I want to repeat this same action automatically with some kind
of code. Like I put in the first date and print the spreadsheet, then go
back to cell I1 (is where the date resides)have the date increment by 1
print. Do that for everyday of the month. Is this possible?

"William Horton" wrote:

Oh, I think I understand you now. Running the code I provided you with
should have successfully set the "Print Area" of each worksheet in your
workbook. It will NOT actually print any of your worksheets. To print all
of the worksheets in a workbook choose from the Excel menu path File / Print
and then choose the Entire Workbook option in the print what section at the
bottom of the dialog box. Choose whatever other options you want and click
OK. This should print the Entire workbook using the print area that you set
on all the worksheets using the macro I provided.

Hope this is what you needed.

Thanks,
Bill Horton

"lschuh" wrote:

Sub setprintareaallsheets()
Dim sh As Worksheet
For Each sh In ActiveWorkbook.Sheets
sh.PageSetup.PrintArea = "a1:j48"
Next sh
End Sub

this is what I put in the this workbook
I went to the tools, macros, picked the macro and chose run. I only got 1
sheet.
I don't know how to print the next worksheet. I don't know how to code that.

"William Horton" wrote:

It should work. It's working for me. Dumb question, but are you running the
macro properly. Put your cursor anywhere in the workbook you want to set the
print areas for. Then from the Excel menu path choose Tools / Macro /
Macros. Then highlight the macro you created (SetPrintAreasAllSheets) and
click on Run. This should work.


"lschuh" wrote:

I did that and what I am getting is one sheet only. I put the macro in this
workbook
and placed my cursor in a1 of sheet "day0". Did I do something wrong?

"William Horton" wrote:

I don't believe you can change the print area on multiple sheets
simultaneously manually by grouping sheets. However, you can do it by using
a macro. Try the below code.

Sub SetPrintAreaAllSheets()
For Each Sh In ActiveWorkbook.Sheets
Sh.PageSetup.PrintArea = "A1:C25"
Next Sh
End Sub

Ensure you run it from the active workbook (the workbook you want to set the
print area in. It will set the print area for all the sheets in the workbook.
Of course you must substitute your print area range where I have "A1:C25".

Hope this helps.

Thanks,
Bill Horton

"lschuh" wrote:

I have done everything that the help has given me. I need to print out a
spreadsheet that has 31 tabs. I want to change the original print area to a
new one on all the sheets. I can't seem to accomplish this. I have tried to
right click the tabs and choose select (group) I have tried to name ranges
with the ='day1:day31'!a1:j48. This only works on 1 or two pages. Is there
a way to remove an existing print range and replace it with a new one in an
entire workbook? This would be helpful as I need to print out the daily
production for 2 1/2 years (1000 sheets of paper).

Reply
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
Print all charts in a workbook (multiple worksheets) aewsaws Charts and Charting in Excel 4 May 12th 23 03:45 AM
Print Spreadsheet tabs in a Workbook to a List? Jugglertwo Excel Discussion (Misc queries) 3 May 28th 05 07:04 PM
Excel should let me set the print default to "Entire Workbook". GSL Setting up and Configuration of Excel 1 February 7th 05 08:03 PM
Changing print area Aaron Excel Discussion (Misc queries) 2 January 9th 05 05:58 PM


All times are GMT +1. The time now is 09:20 PM.

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"