Hi,
I'm looking to create a automatically updating file name. I have created a workbook that is being used as calculator. I need to make the workbook so it is unable to save which I have already done using the following code:
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
ThisWorkbook.Saved = True
Cancel = True
End Sub
Private Sub Workbook_BeforeClose(Cancel As Boolean)
ThisWorkbook.Saved = True
End Sub
(this was my first macro code I have ever done to give you an indication of my use level)
I'm now looking to keep this functionality, but I would like the file name to update each time it is opened. this can be done jut with a rolling number.
Can anyone help me cod this?
Thanks!
I'm looking to create a automatically updating file name. I have created a workbook that is being used as calculator. I need to make the workbook so it is unable to save which I have already done using the following code:
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
ThisWorkbook.Saved = True
Cancel = True
End Sub
Private Sub Workbook_BeforeClose(Cancel As Boolean)
ThisWorkbook.Saved = True
End Sub
(this was my first macro code I have ever done to give you an indication of my use level)
I'm now looking to keep this functionality, but I would like the file name to update each time it is opened. this can be done jut with a rolling number.
Can anyone help me cod this?
Thanks!