View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Don Guillett[_2_] Don Guillett[_2_] is offline
external usenet poster
 
Posts: 1,522
Default Macro to print specified range of several work sheets

On Wednesday, September 26, 2012 4:58:47 PM UTC-5, paul mullan wrote:
Hi I am really struggling to create code to do the following task and

would really appreciate any help:



I have a workbook containing 52 worksheets (named 1 - 52).



I want the same range (A1:AQ104) to be printed but each worksheet

printed on a seperate page



I want to create a macro that when activated will prompt what range of

worksheets are being selected to print (eg 4-10). I was thinking that

I needed to create a userform to achieve this with two seperate spin

buttons to make reference to the "from" and "to" worksheets.



Any helps at least just to set me off in the right direction would be

greatly recieved.



Thanks all


I am going to assume good design in that your sheet 1 is the FIRST, etc

sub printsheets()
fs=inputbox("first sheet?")
ls-inputbox("last sheet")
for i= fs to ls
sheets(i).range(A1:"AQ104").printout
next i
end sub