Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
increment version number
Is there anyway to automatically increment a number in a spreadsheet
everytime the document is saved? ie version number? |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
increment version number
Paste following code in Workbook's code:
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean) With Me.Worksheets("Sheet1").Range("A1") .Value = .Value + 1 End With End Sub HTH -- AP "Lozza77" a écrit dans le message de news: ... Is there anyway to automatically increment a number in a spreadsheet everytime the document is saved? ie version number? |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
increment version number
Thanks Ardus.
How do you edit the workbooks code or do you mean paste it into a cell? Sorry - I'm a novice! Regards, Louren. "Ardus Petus" wrote: Paste following code in Workbook's code: Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean) With Me.Worksheets("Sheet1").Range("A1") .Value = .Value + 1 End With End Sub HTH -- AP "Lozza77" a écrit dans le message de news: ... Is there anyway to automatically increment a number in a spreadsheet everytime the document is saved? ie version number? |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
increment version number
Right-click on the Excel icon on top left of your worksheet,
then select Code. Paste the code in the newly opened window. Get back to Excel (vlick on Excel icon) Save your workbook: the version number will go up by 1 HTH -- AP "Lozza77" a écrit dans le message de news: ... Thanks Ardus. How do you edit the workbooks code or do you mean paste it into a cell? Sorry - I'm a novice! Regards, Louren. "Ardus Petus" wrote: Paste following code in Workbook's code: Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean) With Me.Worksheets("Sheet1").Range("A1") .Value = .Value + 1 End With End Sub HTH -- AP "Lozza77" a écrit dans le message de news: ... Is there anyway to automatically increment a number in a spreadsheet everytime the document is saved? ie version number? |
#5
Posted to microsoft.public.excel.misc
|
|||
|
|||
increment version number
Brilliant!
That works perfectly - thanks very much Ardus. "Ardus Petus" wrote: Paste following code in Workbook's code: Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean) With Me.Worksheets("Sheet1").Range("A1") .Value = .Value + 1 End With End Sub HTH -- AP "Lozza77" a écrit dans le message de news: ... Is there anyway to automatically increment a number in a spreadsheet everytime the document is saved? ie version number? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
vlookup with more than number to be retrieved | Excel Worksheet Functions | |||
Preceding a number by zeros, that is still a number | Excel Worksheet Functions | |||
Number of labels on X-axis one more than number of values on Y-axi | Charts and Charting in Excel | |||
Need number of Saturdays and number of Sundays between 2 dates | Excel Worksheet Functions | |||
How do I automatically increment worksheet number when pasting a . | Excel Worksheet Functions |