I have the following routine in Excel
Dim filenames As Variant
Dim counter As Integer
' set the array to a variable and the True is for multi-select
filenames = Application.GetOpenFilename(, , , , True)
counter = 1
' Ubound determines how many items in the array
While counter <= UBound(filenames)
'Opens the selected files
Sheets(Array("DB p1", "DB p2")).Select
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
'Close the selected files
counter = counter + 1
It allows me to select files, automatically open them and print them on pdf if I set my pdf as default printer BUT the only drwback is that I get a popup asking me to save the PDF with the Excel file name.PDF and then it shows the pdf file...
Is there anyway to eliminate the PDF popup asking to save and the subsequent pdf file display?
I basically want the file to be autoamtically saved with whatever name is already assigned to the Excel file.PDF