I am working on a Macro (1st time ever) for my quotes. I have it just about how I need it, however, there will be multiple users and I need it to clear multiple sheets and save all sheets to a new Macro Free excel doc, and I need it to Pdf the first sheet only, and print first and second sheets. Also, I need to make sure the original stays original.
Here are the codes I have that work but not quite what I need.
Sub NextQuote()
Range("b18").Value = Range("b18").Value + 1
Range("a20:g48").ClearContents
Range("b8:b17").ClearContents
Range("h8:h18").ClearContents
End Sub
Sub savequotewithnewname()
Dim NewFN As Variant
' Copy Invoice to a new workbook
ActiveSheet.Copy
NewFN = "M:\Quotes & bids\TEST\Quote-" & Range("B9") & "-" & Range("B18").Value & "-" & Format(Now(), "MMDDYYYY") & ".xlsx"
ActiveWorkbook.SaveAs NewFN, FileFormat:=xlOpenXMLWorkbook
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, _
Filename:="M:\Quotes & bids\TEST\Quote-" & Range("B9") & "-" & Range("B18").Value & "-" & Format(Now(), "MMDDYYYY") & ".pdf"
ActiveWorkbook.Close
NextQuote
End Sub
Any help you guy can provide would be greatly appreciated.
Here are the codes I have that work but not quite what I need.
Sub NextQuote()
Range("b18").Value = Range("b18").Value + 1
Range("a20:g48").ClearContents
Range("b8:b17").ClearContents
Range("h8:h18").ClearContents
End Sub
Sub savequotewithnewname()
Dim NewFN As Variant
' Copy Invoice to a new workbook
ActiveSheet.Copy
NewFN = "M:\Quotes & bids\TEST\Quote-" & Range("B9") & "-" & Range("B18").Value & "-" & Format(Now(), "MMDDYYYY") & ".xlsx"
ActiveWorkbook.SaveAs NewFN, FileFormat:=xlOpenXMLWorkbook
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, _
Filename:="M:\Quotes & bids\TEST\Quote-" & Range("B9") & "-" & Range("B18").Value & "-" & Format(Now(), "MMDDYYYY") & ".pdf"
ActiveWorkbook.Close
NextQuote
End Sub
Any help you guy can provide would be greatly appreciated.