E
eyesonly1965
i have a workbook with a few hidden sheets and a form.
but i only want to save the main sheet under a different name.
the code i have for saving is:
-Sub cmdSave_Click()
With ActiveWorkbook.Sheets("Gegevensblad")
'First part of filename...
a = Range("A4").Value & " - " & Range("B4").Value
'Filename extension...
c = ".xls"
s_filename = a + c
Dim fname As Variant
fname =
Application.GetSaveAsFilename(InitialFileName:=s_filename)
If fname = False Then
Debug.Print "user clicked cancel"
'do nothing
Else
Debug.Print "user chose " & fname
ActiveWorkbook.SaveAs Filename:=fname
End If
End With-
i want the option to save the file with this name but it should only
save the main sheet in a new file.
can anyone help me ?
but i only want to save the main sheet under a different name.
the code i have for saving is:
-Sub cmdSave_Click()
With ActiveWorkbook.Sheets("Gegevensblad")
'First part of filename...
a = Range("A4").Value & " - " & Range("B4").Value
'Filename extension...
c = ".xls"
s_filename = a + c
Dim fname As Variant
fname =
Application.GetSaveAsFilename(InitialFileName:=s_filename)
If fname = False Then
Debug.Print "user clicked cancel"
'do nothing
Else
Debug.Print "user chose " & fname
ActiveWorkbook.SaveAs Filename:=fname
End If
End With-
i want the option to save the file with this name but it should only
save the main sheet in a new file.
can anyone help me ?