Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
how to automatically number rows in an excel worksheet | Excel Worksheet Functions | |||
Automatically generating a number range | Excel Worksheet Functions | |||
Pulling Data off Web - Need Function Help | Excel Worksheet Functions | |||
After printing, it will be given a new number | Excel Discussion (Misc queries) | |||
how do I put a a sequence number into colun A automatically witho. | Excel Discussion (Misc queries) |