Hi All,
I am a new member and saw a post with the above title that cam close to solving my problem but I still need help if possible.
I am using Excel 2016 on the iMac for this project (not by choice).
I have an excel Pivot table on a tab named"Summary" which has a drop down in cell "F2" which points to a another sheet called "Drop Down" containing 100 client names and allows choosing a client's name from and updates the individual client's information on the "Summary" sheet which then prepares/allows the choosing of save as PDF and a dialog box pops up asking for the names of the file to save and where (the file name is the same name that displays in the dropdown in cell "F2" and once filled in it saves the PDF to the documents folder with the Name of Client Statements 8/15/15 or 8/31/15 these statements are prepared twice a month.
I believe LukeM's code will work but I don't fully understand it, like the ', I have listed his code below; any help will be greatly appreciated thank you MikeBa41:
I am a new member and saw a post with the above title that cam close to solving my problem but I still need help if possible.
I am using Excel 2016 on the iMac for this project (not by choice).
I have an excel Pivot table on a tab named"Summary" which has a drop down in cell "F2" which points to a another sheet called "Drop Down" containing 100 client names and allows choosing a client's name from and updates the individual client's information on the "Summary" sheet which then prepares/allows the choosing of save as PDF and a dialog box pops up asking for the names of the file to save and where (the file name is the same name that displays in the dropdown in cell "F2" and once filled in it saves the PDF to the documents folder with the Name of Client Statements 8/15/15 or 8/31/15 these statements are prepared twice a month.
I believe LukeM's code will work but I don't fully understand it, like the ', I have listed his code below; any help will be greatly appreciated thank you MikeBa41:
Code:
Sub PsuedoCode()
Dim xName AsString
Dim c As Range
Dim MyList As Range
Dim DropRange As Range
'Where is list of names?
Set MyList = Worksheets("Sheet1").Range("A1:A100")
'Where is dropdown?
Set DropRange = Worksheets("Sheet1").Range("b1")
Application.ScreenUpdating = False
ForEach c In MyList
xName = c.Value
DropRange.Value = xName
'workbook should automatically calculate/run macro
'at this point
'TODO:
'Record a macro of you printing to a pdf
'should look something like:
Application.ActivePrinter = "Adobe PDF on Ne02:"
ExecuteExcel4Macro "PRINT(1,,,1,,,,,,,,2,""Adobe PDF on Ne02:"",,TRUE,,FALSE)"
'or, if you see where it record the file name, you can use the
'xName variable to populate the name
Next
Application.ScreenUpdating = True
EndSub
Last edited by a moderator: