billandrew
Well-known Member
- Joined
- Mar 9, 2014
- Messages
- 743
Good Evening
Looking for some assist here. I am saving a workbook whichcontains several worksheets. When the new file is created there are two issues.
1. Message indicating to save the new file as an xlsx not amacro enabled file.
2. The new Worksheet the sheets have been grouped.
How can I avoid each of the above.
The code I am currently working with is:
Looking for some assist here. I am saving a workbook whichcontains several worksheets. When the new file is created there are two issues.
1. Message indicating to save the new file as an xlsx not amacro enabled file.
2. The new Worksheet the sheets have been grouped.
How can I avoid each of the above.
The code I am currently working with is:
Code:
Sub SaveE()
Dim Mypath As String
Dim Filename As String
Mypath = Environ("USERPROFILE") & "\Desktop\"
Filename = CreateObject("Scripting.FileSystemObject").GetBaseName(ActiveWorkbook.Name)
Sheets.Select
ActiveWorkbook.SaveAs Filename:=Mypath & " " & Filename & " " & ".xlsx", FileFormat:=51
End Sub