View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
Gord Dibben Gord Dibben is offline
external usenet poster
 
Posts: 22,906
Default Automatically increasing a number by 1

Dave

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

Adjust sheet and range to suit.

Right-click on the Excel Icon left of "File" on the menubar.

Select "View Code".

Paste the above into that module.


Gord Dibben MS Excel MVP

On Wed, 23 Aug 2006 13:58:02 -0700, Dave wrote:

How can I get a number in a cell to automatically in crease by 1 when the
workbook is opened?

THanks