I have the following code that works great. It copies the first sheet as an excel file (.xlsx)
The problem is that now there are Form Control buttons and Active-X buttons on the main sheet that are being copied over to the new file when saved using the code below. I don't want any buttons copied over to a new file.
I've researched for an hour on how to remove the buttons when saving the file, but can't find anything that covers this. I know I've seen this covered somewhere, but a search is not coming up with the answer I need.
Any help is greatly appreciated.
Here's the code...
Sub saveas()
Dim fn As String
Dim l As Long
Dim wb As Workbook
Set wb = ActiveWorkbook
fn = wb.FullName
l = InStrRev(fn, ".")
fn = Left(fn, l)
fn = fn & "xls"
wb.saveas Filename:=fn, FileFormat:=56
End Sub
The problem is that now there are Form Control buttons and Active-X buttons on the main sheet that are being copied over to the new file when saved using the code below. I don't want any buttons copied over to a new file.
I've researched for an hour on how to remove the buttons when saving the file, but can't find anything that covers this. I know I've seen this covered somewhere, but a search is not coming up with the answer I need.
Any help is greatly appreciated.
Here's the code...
Sub saveas()
Dim fn As String
Dim l As Long
Dim wb As Workbook
Set wb = ActiveWorkbook
fn = wb.FullName
l = InStrRev(fn, ".")
fn = Left(fn, l)
fn = fn & "xls"
wb.saveas Filename:=fn, FileFormat:=56
End Sub