Let's assume that your file name is stored in the string "FName"
Use this line to export your excel sheet to PDF format
' ThisWorkbook.ExportAsFixedFormat Type:=xlTypePDF, filename:=FName, _
Quality:=xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:=False
For clearing data from G5 cell use this code
Range("G5") =""
For printing use code below:
Sub Printpage()
' let's assume that you need to print range A3 to F62. You can change it as per your need.
Range("A3:F62").Select
ActiveSheet.PageSetup.PrintArea = "$A$3:$F$62"
Application.Dialogs(xlDialogPrint).Show ' this will open print dialouge box. Select 3 copies to print here.
Regards,
xlman
Bookmarks