Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Sverre
I have done something similar on PDF version 5 and it works well. It assumes you are using a data Validation list for your drop down. It Loops through the list in cell B5 and prints to pdf. You will need to adapt this to suit your problem. Take care Marcus Sub ValListLoop() Dim rng As Range, cell As Range Dim mycells As String Dim PDFFileName As String Set rng = Evaluate(ActiveSheet.Range("B5").Validation.Formul a1) For Each cell In rng Application.Calculation = xlAutomatic 'turn calcs on ActiveSheet.Range("B5").Value = cell.Value 'Change to suit mycells = Range("B5").Value 'Change to suit Sheets("Sheet1").Select 'Change to suit Application.ActivePrinter = "Adobe PDF on Ne01:" 'Change path Let PDFFileName = "C:\" & mycells & ".pdf" ' change to desktop path SendKeys PDFFileName & "{ENTER}", False ActiveWindow.SelectedSheets.PrintOut copies:=1 SFileName = Chr(34) & PDFFileName & Chr(34) Next Application.Calculation = xlManual 'turn calcs off End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Looking for best method to automate monthly Excel report | Excel Programming | |||
Automate Excel report to place certain data into existing report? | Excel Worksheet Functions | |||
automate entries into document from a excel database | New Users to Excel | |||
'document not saved' for 'save' or 'save as' an EXCEL file | Excel Discussion (Misc queries) | |||
Excel 2002 Automate shared workbook at close to save changes to new document | Excel Programming |