View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
jk jk is offline
external usenet poster
 
Posts: 109
Default Macro change on rename

I am using a macro to place a timestamp on workbook open and it saves it at
this time but if i rename the work book, then try to run the macro i receive
a file not found.

Private Sub Workbook_Open()
Worksheets("Sheet4").Range("I1").Value = Format(Now, "dd mmm yyyy
hh:mm:ss")
End Sub
Sub DateTime()

Worksheets("Sheet4").Range("I1").Value = _
Format(Now, "dd mmm yyyy hh:mm:ss")
End Sub
The above code is what i am using and it works but the renaming of the file
could be an issue.Is there a work around on this?