Hello!
<?xml:namespace prefix = o ns = "urn:schemas-microsoft-comfficeffice" /><o></o>
I am trying to write a macro that takes an (already open) .xlsm file and saves it as a .xlsx file with the same name plus “FROZEN – “ at the beginning. My code currently is:
<o></o>
<o></o>
I am running into 2 problems.
<o></o>
1. The file only saves in the “My Documents” folder. I want it to save in the same folder as the original file. My understanding was this would automatically happen with the .SaveAs method if no other path was specified, but that isn’t happening.
<o></o>
2. When attempting to close the new .xlsx file, my BeforeClose macros are still running. Since a .xlsx file should have no macros, I don’t know why this is happening. It is a problem because my BeforeClose macro hides a bunch of tabs that I need visible in the new file format.
<o></o>
Help?
<o></o>
Thank you!!
<?xml:namespace prefix = o ns = "urn:schemas-microsoft-comfficeffice" /><o></o>
I am trying to write a macro that takes an (already open) .xlsm file and saves it as a .xlsx file with the same name plus “FROZEN – “ at the beginning. My code currently is:
<o></o>
Code:
ActiveWorkbook.SaveAs Filename:="FROZEN - " & Left(ActiveWorkbook.Name, Len(ActiveWorkbook.Name) - 5), FileFormat:=xlOpenXMLWorkbook
ActiveWorkbook.Close
I am running into 2 problems.
<o></o>
1. The file only saves in the “My Documents” folder. I want it to save in the same folder as the original file. My understanding was this would automatically happen with the .SaveAs method if no other path was specified, but that isn’t happening.
<o></o>
2. When attempting to close the new .xlsx file, my BeforeClose macros are still running. Since a .xlsx file should have no macros, I don’t know why this is happening. It is a problem because my BeforeClose macro hides a bunch of tabs that I need visible in the new file format.
<o></o>
Help?
<o></o>
Thank you!!