Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 226
Default 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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 709
Default 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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 226
Default 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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 709
Default 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
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






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
Pulling Data off Web - Need Function Help patfergie44 Excel Worksheet Functions 9 June 22nd 06 03:27 AM
Generate Auto Order Number cher Excel Discussion (Misc queries) 1 March 28th 06 06:15 PM
Return SEARCHED Column Number of Numeric Label and Value Sam via OfficeKB.com Excel Worksheet Functions 23 January 30th 06 06:16 PM
How do I auto number cells in an Excel template? Natalie Excel Discussion (Misc queries) 3 March 30th 05 03:42 AM
assign auto number and auto date Krit Kasem Excel Discussion (Misc queries) 2 January 14th 05 02:55 AM


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