ChatterBank1 min ago
Excel macros
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
Thanks
Keithg
Answers
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.
Act iveWorkbook. SaveAs Filename:=" C:\ Data\ testfile. xls"
Act
12: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"
ActiveWorkbook.SaveAs Filename:="C:\Data\testfile.xls"