I am trying to get a field on a excel file to increase each time the file is opened.
Attached is the file and I have tried inserting the following code into it.
Private Sub Workbook_Open()
Range("F3").Value = 1 + Range("F3").Value
End Sub
This I thought would increase the value of the cell by 1 each time the file is opened. However this isn't working and i have no idea why. I am literally ripping my hair out over this. I'm sure it’s really simple to do.
I've copied your code into a workbook and it runs OK.
How about changing the name of the Sub to "AutoOpen" so it runs everytime it runs when the workbook opens. Possibly change it to an xlsm file which is what I've saved it as?
Blast beaten too it!
Last edited by Stuart_C; 14th November 2012 at 10:13 AM.