new version# when opening file

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
 
B

Bob Phillips

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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top