G
Guest
I am using the Invoice template to create new invoices.
The following SaveInvoice() macro is in PERSONAL.XLS.
The macro appears to save the PERSONAL.XLS sheet only.
I need the Invoice saved instead.
How do I modify this macro to save only the Invoice?
The filename operates correctly.
Thanks.
Sub SaveInvoice()
Dim flToSave As Variant
Dim flName As String
Dim flFormat As Long
flFormat = ActiveWorkbook.FileFormat
flName = "Invoice_" & Cells(4, 12).Value
flToSave = Application.GetSaveAsFilename _
(flName, filefilter:="Excel Files (*.xls), *.xls", Title:="Save File
As...")
If flToSave = False Then
Exit Sub
Else
ThisWorkbook.SaveAs Filename:=flToSave, FileFormat:=flFormat
End If
End Sub
The following SaveInvoice() macro is in PERSONAL.XLS.
The macro appears to save the PERSONAL.XLS sheet only.
I need the Invoice saved instead.
How do I modify this macro to save only the Invoice?
The filename operates correctly.
Thanks.
Sub SaveInvoice()
Dim flToSave As Variant
Dim flName As String
Dim flFormat As Long
flFormat = ActiveWorkbook.FileFormat
flName = "Invoice_" & Cells(4, 12).Value
flToSave = Application.GetSaveAsFilename _
(flName, filefilter:="Excel Files (*.xls), *.xls", Title:="Save File
As...")
If flToSave = False Then
Exit Sub
Else
ThisWorkbook.SaveAs Filename:=flToSave, FileFormat:=flFormat
End If
End Sub