Donate SIGN UP

Excel macros

Avatar Image
keithg | 09:29 Tue 09th Oct 2012 | Technology
2 Answers
I have some files in Excel 2007 which I save to various locations using a macro. I want to add another location without,as I am doing now, deleting the macro and creating a new macro with new location in it.

Thanks

Keithg
Gravatar

Answers

1 to 2 of 2rss feed

Avatar Image
Go to the VBA editor (Alt + F11) and find the macro - try double clicking the modules on the left hand side, it should be in there somewhere. Add the following line of code and change the filename to the other location you want to save it as. Job done.

ActiveWorkbook.SaveAs Filename:="C:\Data\testfile.xls"
13:00 Tue 09th Oct 2012
Go to the VBA editor (Alt + F11) and find the macro - try double clicking the modules on the left hand side, it should be in there somewhere. Add the following line of code and change the filename to the other location you want to save it as. Job done.

ActiveWorkbook.SaveAs Filename:="C:\Data\testfile.xls"
Question Author
Thanks Hammer followed your advice,problem sorted.
Thanks
keithg

1 to 2 of 2rss feed

Do you know the answer?

Excel macros

Answer Question >>