Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 74
Default printing sheets from a workbook

Hello!
I would like to create a log book, with Excel. I would like to have one
sheet repeated over and over, for about 150 pages, with page N of NN as the
footer. I know how to do the footer, but does anyone have ideas on how to
create the duplicate pages for the log book?
Thanks
Anne
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22,906
Default printing sheets from a workbook

Anne

You want 150 printed copies of one worksheet and you have already set the Footer
as Page N of NN?

This macro will print 150 copies of a sheet.

Sub PrintCopies()
Dim i As Long
For i = 1 To 150
ActiveSheet.PrintOut
Next i
End Sub

If not familiar with VBA and macros, see David McRitchie's site for more on
"getting started".

http://www.mvps.org/dmcritchie/excel/getstarted.htm

In the meantime..........

First...create a backup copy of your original workbook.

To create a General Module, hit ALT + F11 to open the Visual Basic Editor.

Hit CRTL + r to open Project Explorer.

Find your workbook/project and select it.

Right-click and InsertModule. Paste the code in there. Save the
workbook and hit ALT + Q to return to your workbook.

Run the macro by going to ToolMacroMacros.

You can also assign this macro to a button or a shortcut key combo.


Gord Dibben MS Excel MVP


On Tue, 12 Dec 2006 08:28:02 -0800, Anne wrote:

Hello!
I would like to create a log book, with Excel. I would like to have one
sheet repeated over and over, for about 150 pages, with page N of NN as the
footer. I know how to do the footer, but does anyone have ideas on how to
create the duplicate pages for the log book?
Thanks
Anne


Gord Dibben MS Excel MVP
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 74
Default printing sheets from a workbook

Thanks, I will try that!
Anne

"Gord Dibben" wrote:

Anne

You want 150 printed copies of one worksheet and you have already set the Footer
as Page N of NN?

This macro will print 150 copies of a sheet.

Sub PrintCopies()
Dim i As Long
For i = 1 To 150
ActiveSheet.PrintOut
Next i
End Sub

If not familiar with VBA and macros, see David McRitchie's site for more on
"getting started".

http://www.mvps.org/dmcritchie/excel/getstarted.htm

In the meantime..........

First...create a backup copy of your original workbook.

To create a General Module, hit ALT + F11 to open the Visual Basic Editor.

Hit CRTL + r to open Project Explorer.

Find your workbook/project and select it.

Right-click and InsertModule. Paste the code in there. Save the
workbook and hit ALT + Q to return to your workbook.

Run the macro by going to ToolMacroMacros.

You can also assign this macro to a button or a shortcut key combo.


Gord Dibben MS Excel MVP


On Tue, 12 Dec 2006 08:28:02 -0800, Anne wrote:

Hello!
I would like to create a log book, with Excel. I would like to have one
sheet repeated over and over, for about 150 pages, with page N of NN as the
footer. I know how to do the footer, but does anyone have ideas on how to
create the duplicate pages for the log book?
Thanks
Anne


Gord Dibben MS Excel MVP

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 74
Default printing sheets from a workbook

Gord, when I try this--thanks for the code--I get one sheet printed 150 times
(actually, I set it to 5 pages to test)... and each sheet says page 1 of 1.

I need each sheet to say 1 of 5, 2 of 5, 3 of 5... does that make sense? Any
help you could provide on this would be great.
Anne

"Gord Dibben" wrote:

Anne

You want 150 printed copies of one worksheet and you have already set the Footer
as Page N of NN?

This macro will print 150 copies of a sheet.

Sub PrintCopies()
Dim i As Long
For i = 1 To 150
ActiveSheet.PrintOut
Next i
End Sub

If not familiar with VBA and macros, see David McRitchie's site for more on
"getting started".

http://www.mvps.org/dmcritchie/excel/getstarted.htm

In the meantime..........

First...create a backup copy of your original workbook.

To create a General Module, hit ALT + F11 to open the Visual Basic Editor.

Hit CRTL + r to open Project Explorer.

Find your workbook/project and select it.

Right-click and InsertModule. Paste the code in there. Save the
workbook and hit ALT + Q to return to your workbook.

Run the macro by going to ToolMacroMacros.

You can also assign this macro to a button or a shortcut key combo.


Gord Dibben MS Excel MVP


On Tue, 12 Dec 2006 08:28:02 -0800, Anne wrote:

Hello!
I would like to create a log book, with Excel. I would like to have one
sheet repeated over and over, for about 150 pages, with page N of NN as the
footer. I know how to do the footer, but does anyone have ideas on how to
create the duplicate pages for the log book?
Thanks
Anne


Gord Dibben MS Excel MVP

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 35,218
Default printing sheets from a workbook

So you have data on one worksheet that prints on one sheet of paper.

And you want to print that 150 times and each printed sheet should look the same
except for the footer that should say 1 of 150, 2 of 150, ..., 150 of 150?

Option Explicit
Sub PrintCopies()

Dim wks As Worksheet
Dim iCtr As Long
Dim HowMany As Long

Set wks = ActiveSheet

HowMany = 5 '150 after testing

With wks
For iCtr = 1 To HowMany
.PageSetup.CenterFooter = "Page " & iCtr & " of " & HowMany
'only the first page from that worksheet
.PrintOut from:=1, to:=1, preview:=True
Next iCtr
End With
End Sub

Preview:=true will save paper while testing.


Anne wrote:

Gord, when I try this--thanks for the code--I get one sheet printed 150 times
(actually, I set it to 5 pages to test)... and each sheet says page 1 of 1.

I need each sheet to say 1 of 5, 2 of 5, 3 of 5... does that make sense? Any
help you could provide on this would be great.
Anne

"Gord Dibben" wrote:

Anne

You want 150 printed copies of one worksheet and you have already set the Footer
as Page N of NN?

This macro will print 150 copies of a sheet.

Sub PrintCopies()
Dim i As Long
For i = 1 To 150
ActiveSheet.PrintOut
Next i
End Sub

If not familiar with VBA and macros, see David McRitchie's site for more on
"getting started".

http://www.mvps.org/dmcritchie/excel/getstarted.htm

In the meantime..........

First...create a backup copy of your original workbook.

To create a General Module, hit ALT + F11 to open the Visual Basic Editor.

Hit CRTL + r to open Project Explorer.

Find your workbook/project and select it.

Right-click and InsertModule. Paste the code in there. Save the
workbook and hit ALT + Q to return to your workbook.

Run the macro by going to ToolMacroMacros.

You can also assign this macro to a button or a shortcut key combo.


Gord Dibben MS Excel MVP


On Tue, 12 Dec 2006 08:28:02 -0800, Anne wrote:

Hello!
I would like to create a log book, with Excel. I would like to have one
sheet repeated over and over, for about 150 pages, with page N of NN as the
footer. I know how to do the footer, but does anyone have ideas on how to
create the duplicate pages for the log book?
Thanks
Anne


Gord Dibben MS Excel MVP


--

Dave Peterson


  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 74
Default printing sheets from a workbook

Thanks, Dave! This will work!!

"Dave Peterson" wrote:

So you have data on one worksheet that prints on one sheet of paper.

And you want to print that 150 times and each printed sheet should look the same
except for the footer that should say 1 of 150, 2 of 150, ..., 150 of 150?

Option Explicit
Sub PrintCopies()

Dim wks As Worksheet
Dim iCtr As Long
Dim HowMany As Long

Set wks = ActiveSheet

HowMany = 5 '150 after testing

With wks
For iCtr = 1 To HowMany
.PageSetup.CenterFooter = "Page " & iCtr & " of " & HowMany
'only the first page from that worksheet
.PrintOut from:=1, to:=1, preview:=True
Next iCtr
End With
End Sub

Preview:=true will save paper while testing.


Anne wrote:

Gord, when I try this--thanks for the code--I get one sheet printed 150 times
(actually, I set it to 5 pages to test)... and each sheet says page 1 of 1.

I need each sheet to say 1 of 5, 2 of 5, 3 of 5... does that make sense? Any
help you could provide on this would be great.
Anne

"Gord Dibben" wrote:

Anne

You want 150 printed copies of one worksheet and you have already set the Footer
as Page N of NN?

This macro will print 150 copies of a sheet.

Sub PrintCopies()
Dim i As Long
For i = 1 To 150
ActiveSheet.PrintOut
Next i
End Sub

If not familiar with VBA and macros, see David McRitchie's site for more on
"getting started".

http://www.mvps.org/dmcritchie/excel/getstarted.htm

In the meantime..........

First...create a backup copy of your original workbook.

To create a General Module, hit ALT + F11 to open the Visual Basic Editor.

Hit CRTL + r to open Project Explorer.

Find your workbook/project and select it.

Right-click and InsertModule. Paste the code in there. Save the
workbook and hit ALT + Q to return to your workbook.

Run the macro by going to ToolMacroMacros.

You can also assign this macro to a button or a shortcut key combo.


Gord Dibben MS Excel MVP


On Tue, 12 Dec 2006 08:28:02 -0800, Anne wrote:

Hello!
I would like to create a log book, with Excel. I would like to have one
sheet repeated over and over, for about 150 pages, with page N of NN as the
footer. I know how to do the footer, but does anyone have ideas on how to
create the duplicate pages for the log book?
Thanks
Anne

Gord Dibben MS Excel MVP


--

Dave Peterson

  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22,906
Default printing sheets from a workbook

Anne

My mistake......bad code. Lack of thought.

See Ron de Bruin's site for good code with more thought input.

http://www.rondebruin.nl/print.htm#number

Note: Ron's code is set to print with the value in a cell.

Add an apostrophe to that line and clear the apsostrophe from the
..PageSetup.LeftFooter line.



Gord


On Mon, 18 Dec 2006 12:25:06 -0800, Anne wrote:

Gord, when I try this--thanks for the code--I get one sheet printed 150 times
(actually, I set it to 5 pages to test)... and each sheet says page 1 of 1.

I need each sheet to say 1 of 5, 2 of 5, 3 of 5... does that make sense? Any
help you could provide on this would be great.
Anne

"Gord Dibben" wrote:

Anne

You want 150 printed copies of one worksheet and you have already set the Footer
as Page N of NN?

This macro will print 150 copies of a sheet.

Sub PrintCopies()
Dim i As Long
For i = 1 To 150
ActiveSheet.PrintOut
Next i
End Sub

If not familiar with VBA and macros, see David McRitchie's site for more on
"getting started".

http://www.mvps.org/dmcritchie/excel/getstarted.htm

In the meantime..........

First...create a backup copy of your original workbook.

To create a General Module, hit ALT + F11 to open the Visual Basic Editor.

Hit CRTL + r to open Project Explorer.

Find your workbook/project and select it.

Right-click and InsertModule. Paste the code in there. Save the
workbook and hit ALT + Q to return to your workbook.

Run the macro by going to ToolMacroMacros.

You can also assign this macro to a button or a shortcut key combo.


Gord Dibben MS Excel MVP


On Tue, 12 Dec 2006 08:28:02 -0800, Anne wrote:

Hello!
I would like to create a log book, with Excel. I would like to have one
sheet repeated over and over, for about 150 pages, with page N of NN as the
footer. I know how to do the footer, but does anyone have ideas on how to
create the duplicate pages for the log book?
Thanks
Anne


Gord Dibben MS Excel MVP


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
One workbook to another . . . Wayne Knazek Excel Discussion (Misc queries) 2 September 26th 06 08:49 PM
LINKEDRANGE function - a complement to the PULL function (for getting values from a closed workbook) [email protected] Excel Worksheet Functions 0 September 5th 06 03:44 PM
add new sheets in a workbook with new sheets being a variable [email protected] Excel Discussion (Misc queries) 1 April 11th 06 08:38 PM
Printing Multiple sheets light_life_love Excel Discussion (Misc queries) 0 August 25th 05 08:52 PM
Finding specific sheets within a workbook Roy Excel Discussion (Misc queries) 2 August 23rd 05 06:40 PM


All times are GMT +1. The time now is 04:50 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"