Spartan300
Board Regular
- Joined
- Jul 1, 2008
- Messages
- 71
Hello,
I have written some code that activates a new excel sheet then saves it as..
I then need to activate this sheet later on in the code. I know the code to activate it...
etc.
But my question is, with a variable in the file name (Format(Date,"dd mm yyyy") how can I successfully reference the newly saved sheet to activate it?
Thanks for your help.
I have written some code that activates a new excel sheet then saves it as..
Code:
ActiveWorkbook.SaveAs "C:\Documents\Saved Reports\Monthly Report/Monthly Report Emailed on " & Format(Date, "dd mm yyyy") & ".xls"
I then need to activate this sheet later on in the code. I know the code to activate it...
Code:
Windows("Book1").Activate
But my question is, with a variable in the file name (Format(Date,"dd mm yyyy") how can I successfully reference the newly saved sheet to activate it?
Thanks for your help.