Hi.
I'm pretty new to VBA's and Macros, so apologies if this is a daft request.
I have a workbook where I would like to save the active worksheet as a new workbook, in a specific C: location and use the value in a cell as the filename.
I have done this in the past, but it was exporting as a PDF, whereas now I want to save this as an Excel Workbook. The code below is for the working PDF export, can this be tweaked to change the file type or does it need to be brand-new code?
Private Sub CommandButton2_Click()
Dim strFileName As String, strC3 As String, strWorksheet As String
'Set Variable Values
strC3 = Range("E39").Value
strWorksheet = ActiveSheet.Name
strFileName = strC3 & " " & strWorksheet
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, FileName:= _
"C:\LinicModules\" & Range("E50").Value, _
Quality:=xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas _
:=False, OpenAfterPublish:=False
End Sub
Thank you in advance
Bookmarks