Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default VBA - Loop a Function

I have the current function:

Sub Printing()
Sheets(ActiveSheet.Index + 1).Activate
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
End Sub

I then want the formula to restart itself on teh current sheet and then
move the next sheet and print the data and so and so on (I have 300
sheets that need to be printed individually to maintain the correct
page numbering).

Thanks for the help.

Scott

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default VBA - Loop a Function

Sub Printing()
for i = 1 to 300
Sheets(i).Activate
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
Next i
End Sub

--
Regards,
Tom Ogilvy



" wrote:

I have the current function:

Sub Printing()
Sheets(ActiveSheet.Index + 1).Activate
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
End Sub

I then want the formula to restart itself on teh current sheet and then
move the next sheet and print the data and so and so on (I have 300
sheets that need to be printed individually to maintain the correct
page numbering).

Thanks for the help.

Scott


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default VBA - Loop a Function

Thanks Tom.

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
Does loop function cause this problem? Eric Excel Worksheet Functions 3 July 1st 07 01:40 PM
If-Else Simple Loop function Junior728 Excel Programming 3 August 1st 05 09:27 AM
Loop Function unable to loop Junior728 Excel Programming 1 July 28th 05 10:23 AM
Calling a function from a subroutine loop Dan Excel Programming 1 November 27th 04 01:28 AM
Need function for checkbox in loop Matt Excel Programming 7 January 14th 04 03:29 AM


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

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

About Us

"It's about Microsoft Excel"