Macro for printing from dropdown menu

Copper Contributor

Good Afternoon,

 

I need to print pick sheets for employees.

I have already created a template of a picksheet in a worksheet and the sheet is generated using drop down menu of depot name and vlookups.

Now i need a macro that is able to print the Picksheets of all Depots listed on the drop down list all at once, instead of selecting a depot one at a time then print.

2 Replies

@marc47555

 

Hi,

 

Please try this code:

Sub PrintOutAllDepots()
    Dim r As Range
    Set r = Sheets("Orders").Range("D4:P4")
    Dim i As Integer
    i = 1
    Sheets("Pallet Card").Activate
    
    For Each c In r
        Range("R1").Value = r(1, i).Value
        ActiveWindow.SelectedSheets.PrintOut Copies:=1
        i = i + 1
    Next c
    
End Sub

 

Hope that helps

@Haytham Amairah thank  you so much