Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
susan
 
Posts: n/a
Default how do set a number so that it automatically changes

I need to generate a running/consecutive number that will change everytime I
print of the worksheet in cell A1. I cant remember how to do it!!!
Thanks
  #2   Report Post  
Bob Phillips
 
Posts: n/a
Default

One simple way

Private Sub Workbook_BeforePrint(Cancel As Boolean)
Range("A1").Value = Range("A1").Value + 1
End Sub

'This is workbook event code.
'To input this code, right click on the Excel icon on the worksheet
'(or next to the File menu if you maximise your workbooks),
'select View Code from the menu, and paste the code



--

HTH

RP
(remove nothere from the email address if mailing direct)


"susan" wrote in message
...
I need to generate a running/consecutive number that will change everytime

I
print of the worksheet in cell A1. I cant remember how to do it!!!
Thanks



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
Master invoice number Christopher M. Excel Worksheet Functions 0 July 24th 05 04:26 PM
Random Number Questions Greegan Excel Worksheet Functions 1 January 5th 05 02:00 AM
How do I sum 4 number discarding the largest number. SteveP Excel Worksheet Functions 3 December 22nd 04 02:25 PM
How to make Cells automatically become 'highlighted' when number . Kate Excel Worksheet Functions 2 November 25th 04 12:59 AM
How to make Cells automatically become 'highlighted' when number . Kateskyline Excel Worksheet Functions 1 November 24th 04 09:27 PM


All times are GMT +1. The time now is 02:32 AM.

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"