View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
Gary''s Student Gary''s Student is offline
external usenet poster
 
Posts: 11,058
Default automatic numbering of cells in excel

1. touch ALT-F11 to bring up VBA
2. right-click TisWorkbook in the left hand panel
select view code
3. paste the stuff in
4. close the VBA window (save is not necessary)
--
Gary''s Student
gsnu200709


"George" wrote:

Thanks Gary, I am a little green with macros - can you explain this in
greater detail - please?

"Gary''s Student" wrote:

To make cell A1 in Sheet1 increment every time the workbook is opened:

In ThisWorkbook code enter the following macro:

Private Sub Workbook_Open()
Set r = Sheets("Sheet1").Range("A1")
r.Value = r.Value + 1
End Sub

--
Gary''s Student
gsnu200709


"George" wrote:

Is there a way to make a cell automatically number itself everytime the work
book is opened? I would like to create an invoice that automatically changes
it's number when opened.