Hi John
One concern , what if i open the workbook n didnt save it,
next time whn i open the workbook it will reflect same number
try below code in Thisworkbook module
Private Sub Workbook_Open()
Sheets("Sheet1").Range("F2").Value = Sheets("Sheet1").Range("F2").Value + 1
End Sub
Private Sub Work
You can use this :
Private Sub Workbook_Open()
Range("F2").Value = Range("F2").Value + 1
End Sub
From: excel-macros@googlegroups.com [mailto:excel-macros@googlegroups.com]
On Behalf Of John A. Smith
Sent: Thursday, August 11, 2011 1:25 AM
To: excel-macros@googlegroups.com
Subject: $$Excel-Ma
or
Sheet1.Range("f2").Value=Sheet1.Range("f2").Value + 1
-Original Message-
From: XLS S
Sent: Wednesday, August 10, 2011 3:10 PM
To: excel-macros@googlegroups.com
Cc: John A. Smith
Subject: Re: $$Excel-Macros$$ Add 1 to a cell every time the file is opened
Hey
Hey Johnasmith,
Please find the attachment...
Code...
Private Sub Workbook_Open()
dt = Sheet1.Range("f2").Value
Sheet1.Range("f2").Value = dt + 1
End Sub
On Thu, Aug 11, 2011 at 1:24 AM, John A. Smith wrote:
> Excel guru's, can I make a receipt file that adds 1 to a specific cell