Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
Answered in your original thread in excel.misc -- Regards Roger Govier "jk" wrote in message ... This is an excel file and i have code to work on workbook open and also for the time and that is placed in a module of the workbook. I created a custom button to activate the macro to current time then save and it works fine.The problem is if i want to rename the workbook then try to run the macro, it does not recognize the file. "NickHK" wrote: There's nothing in the code to indicate the filename at all. Or do you mean renaming the worksheet ? NickHK P.S. Is this a .CSV file or a true Excel .xls file ? "jk" wrote in message ... 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? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Rename name so formulas show name change | New Users to Excel | |||
Macro to rename .doc | Excel Programming | |||
Change/Rename List | Excel Discussion (Misc queries) | |||
Rename Macro | Excel Discussion (Misc queries) | |||
rename macro | Excel Programming |