Thread: Counter
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Mark D[_4_] Mark D[_4_] is offline
external usenet poster
 
Posts: 3
Default Counter

Where is the code and what do you have written ?

if you add this to ThisWorkBook for example

Private Sub Workbook_Open()
Sheet1.Cells(1, 1).Value = Sheet1.Cells(1, 1).Value + 1
End Sub

It will add a value to the first cell in the workbook and each time the
workbook is opened the value will be incremented by 1.

Mark D

"Andrew" wrote in message
...
Everytime my workbook opens, I want a new number assigned
to a worksheet, simply 1 plus the last number. I keep
getting a circular reference. Any ideas?

Thank you!