Hi all,
Still a novice at VBA....................... Pffff hard work.
Can anybody tell me whats wrong with the following code:
Private Sub Workbook_open()
Dim TheNumber As Range
Set TheNumber = Sheets("sheet 1").Range("q3")
TheNumber.Value = TheNumber.Value + 1
[q4] = Date
End Sub
Private Sub Worksheet_open()
Sub ReNameFile()
ActiveWorkbook.SaveAs FileName:=Range("AA2").Value
End Sub
First bit works great. I am able to generate a sequential number on a sheet and add the date. Then I would like the sheet to change name (e.g. book1.xls) to the name which is in cell AA2. This only works when I manually execute the macro and I would like this to execute automaticly.
Any suggestions out there for this rookie?
Thanks,
Pete
Still a novice at VBA....................... Pffff hard work.
Can anybody tell me whats wrong with the following code:
Private Sub Workbook_open()
Dim TheNumber As Range
Set TheNumber = Sheets("sheet 1").Range("q3")
TheNumber.Value = TheNumber.Value + 1
[q4] = Date
End Sub
Private Sub Worksheet_open()
Sub ReNameFile()
ActiveWorkbook.SaveAs FileName:=Range("AA2").Value
End Sub
First bit works great. I am able to generate a sequential number on a sheet and add the date. Then I would like the sheet to change name (e.g. book1.xls) to the name which is in cell AA2. This only works when I manually execute the macro and I would like this to execute automaticly.
Any suggestions out there for this rookie?
Thanks,
Pete