Hi All,
i am writing a macro to activate a opened file and close the file.the files are generated on daily basis with date appended to it.i combining the string along with the date to activate and close the excel but i am unable to achive this.kindly help
code:
dim daily_timestamp as string
dim daily_filename as string
daily_timestamp = InputBox("Enter the date in YYYY-MM-DD format")
daily_filename = test
Windows("C:\pals\macros\test\"test_" & daily_timestamp & ".xls").Activate
Application.CutCopyMode = False
ActiveWindow.Close
i am writing a macro to activate a opened file and close the file.the files are generated on daily basis with date appended to it.i combining the string along with the date to activate and close the excel but i am unable to achive this.kindly help
code:
dim daily_timestamp as string
dim daily_filename as string
daily_timestamp = InputBox("Enter the date in YYYY-MM-DD format")
daily_filename = test
Windows("C:\pals\macros\test\"test_" & daily_timestamp & ".xls").Activate
Application.CutCopyMode = False
ActiveWindow.Close