new version# when opening file

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I need a spreadsheet where a cell (fx."A1") shows the latest report version,
i.e. the cell needs to change the version-number from # to #+1, when you open
the report.
Does anyone know a macro which can do this ?

BR,
Jakob
 
Private Sub Workbook_Open()
With ThisWorkbook.Worksheets("Sheet1").Range("A1")
.Value = .Value + 1
End With
ThisWorkbook.Save
End Sub

'This is workbook event code.
'To input this code, right click on the Excel icon on the worksheet
'(or next to the File menu if you maximise your workbooks),
'select View Code from the menu, and paste the code


--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
Back
Top