Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
auto number roll over?
strange request he
I have a sheet that is numbered in a cell and I was wondering if there is anyway to advance that number by 1 whenever the sheet is printed (best solution). OR any other suggestion would be great. These are forms that I need to identify individually and I'm being lazy about having to remember to change the number identifier each time Thanks in advance |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
auto number roll over?
Roger, you could use some code like this in the before print event,
Private Sub Workbook_BeforePrint(Cancel As Boolean) Sheets("Sheet1").Range("A1").Value = _ Sheets("Sheet1").Range("A1").Value + 1 End Sub To put in this macro, from your workbook right-click the workbook's icon and pick View Code. This icon is at the top-left of the spreadsheet this will open the VBA editor to the thisworkbook module, then, paste the code in the window that opens on the right hand side, press Alt and Q to close this window and go back to your workbook, now this will run every time you print the workbook. If you are using excel 2000 or newer you may have to change the macro security settings to get the macro to run. To change the security settings go to tools, macro, security, security level and set it to medium For other ways to do this or if this is going to be used in a temple have a look here http://www.mcgimpsey.com/excel/udfs/sequentialnums.html -- Paul B Always backup your data before trying something new Please post any response to the newsgroups so others can benefit from it Feedback on answers is always appreciated! Using Excel 2002 & 2003 "Roger" wrote in message ... strange request he I have a sheet that is numbered in a cell and I was wondering if there is anyway to advance that number by 1 whenever the sheet is printed (best solution). OR any other suggestion would be great. These are forms that I need to identify individually and I'm being lazy about having to remember to change the number identifier each time Thanks in advance |
#3
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
auto number roll over?
that worked, many thanks!
"Paul B" wrote: Roger, you could use some code like this in the before print event, Private Sub Workbook_BeforePrint(Cancel As Boolean) Sheets("Sheet1").Range("A1").Value = _ Sheets("Sheet1").Range("A1").Value + 1 End Sub To put in this macro, from your workbook right-click the workbook's icon and pick View Code. This icon is at the top-left of the spreadsheet this will open the VBA editor to the thisworkbook module, then, paste the code in the window that opens on the right hand side, press Alt and Q to close this window and go back to your workbook, now this will run every time you print the workbook. If you are using excel 2000 or newer you may have to change the macro security settings to get the macro to run. To change the security settings go to tools, macro, security, security level and set it to medium For other ways to do this or if this is going to be used in a temple have a look here http://www.mcgimpsey.com/excel/udfs/sequentialnums.html -- Paul B Always backup your data before trying something new Please post any response to the newsgroups so others can benefit from it Feedback on answers is always appreciated! Using Excel 2002 & 2003 "Roger" wrote in message ... strange request he I have a sheet that is numbered in a cell and I was wondering if there is anyway to advance that number by 1 whenever the sheet is printed (best solution). OR any other suggestion would be great. These are forms that I need to identify individually and I'm being lazy about having to remember to change the number identifier each time Thanks in advance |
#4
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
auto number roll over?
Roger, your welcome
-- Paul B Always backup your data before trying something new Please post any response to the newsgroups so others can benefit from it Feedback on answers is always appreciated! Using Excel 2002 & 2003 "Roger" wrote in message ... that worked, many thanks! "Paul B" wrote: Roger, you could use some code like this in the before print event, Private Sub Workbook_BeforePrint(Cancel As Boolean) Sheets("Sheet1").Range("A1").Value = _ Sheets("Sheet1").Range("A1").Value + 1 End Sub To put in this macro, from your workbook right-click the workbook's icon and pick View Code. This icon is at the top-left of the spreadsheet this will open the VBA editor to the thisworkbook module, then, paste the code in the window that opens on the right hand side, press Alt and Q to close this window and go back to your workbook, now this will run every time you the workbook. If you are using excel 2000 or newer you may have to change the macro security settings to get the macro to run. To change the security settings go to tools, macro, security, security level and set it to medium For other ways to do this or if this is going to be used in a temple have a look here http://www.mcgimpsey.com/excel/udfs/sequentialnums.html -- Paul B Always backup your data before trying something new Please post any response to the newsgroups so others can benefit from it Feedback on answers is always appreciated! Using Excel 2002 & 2003 "Roger" wrote in message ... strange request he I have a sheet that is numbered in a cell and I was wondering if there is anyway to advance that number by 1 whenever the sheet is printed (best solution). OR any other suggestion would be great. These are forms that I need to identify individually and I'm being lazy about having to remember to change the number identifier each time Thanks in advance |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Pulling Data off Web - Need Function Help | Excel Worksheet Functions | |||
Generate Auto Order Number | Excel Discussion (Misc queries) | |||
Return SEARCHED Column Number of Numeric Label and Value | Excel Worksheet Functions | |||
How do I auto number cells in an Excel template? | Excel Discussion (Misc queries) | |||
assign auto number and auto date | Excel Discussion (Misc queries) |