Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default Is there a way to automatically advance a number when printing?

I am designing a shipping tag for one of my customers and I need to know if
there is a way to automatically advance a number everytime I click the print
button. This would make it easier than typing a number one at a time for
about a hundred shipping tags.

Any help would be greatly appreciated.

Thank,

Brian
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,058
Default Is there a way to automatically advance a number when printing?

Put this macro in ThisWorkbook code area:

Private Sub Workbook_BeforePrint(Cancel As Boolean)
Dim ws As Worksheet
If ActiveSheet.Name = "Sheet1" Then
Range("A1").Value = Range("A1").Value + 1
End If
End Sub

Using A1 as an example, it is incremented just before the sheet is printed.
--
Gary's Student


"Brian Smith" wrote:

I am designing a shipping tag for one of my customers and I need to know if
there is a way to automatically advance a number everytime I click the print
button. This would make it easier than typing a number one at a time for
about a hundred shipping tags.

Any help would be greatly appreciated.

Thank,

Brian

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
how to automatically number rows in an excel worksheet NewKid Excel Worksheet Functions 5 September 11th 06 09:32 PM
Automatically generating a number range Alyssa C. Excel Worksheet Functions 2 September 5th 06 11:24 PM
Pulling Data off Web - Need Function Help patfergie44 Excel Worksheet Functions 9 June 22nd 06 03:27 AM
After printing, it will be given a new number momotaro Excel Discussion (Misc queries) 0 March 16th 06 04:00 PM
how do I put a a sequence number into colun A automatically witho. Custodio Bernardes Excel Discussion (Misc queries) 2 January 2nd 05 11:30 PM


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