Apr 21 2020 04:12 AM
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.
Apr 21 2020 05:17 AM
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