Hello!
Im fairly new to VBA coding and i'm trying to learn as much as possible, but right now i'm stuck on this issue.
I have a Excel document where i have a lot of data that transfers through to the next worksheets. I have some of them as landscaped and a few is a standing orientation.
What i'd like the end result of this would be (as close as possible i'd hope):
1) I make my selection in the listbox of the sheets i want to print
2) The macro chooses the specific printer to be printed by (this case its named "Bluebeam PDF") I need it to be this printer so that the columns will remain within the margins
3) The macro is looking for the selections i've made in the listbox
4) I get a preview of the print
5) It prints to a location i select and name the file
I have the listbox set up and a bit of the code but its the final touch that need to be done.
Is it also possible to select how many pages i will print from each worksheet?
The code that is running at the moment:
Sub Print_sh()
Dim i As Long, c As Long
Dim SheetArray() As String
With ActiveSheet.ListBoxPrint
For i = 0 To .ListCount - 1
If .Selected(i) Then
ReDim Preserve SheetArray(c)
SheetArray(c) = .List(i)
c = c + 1
End If
Next i
End With
Sheets(SheetArray()).PrintPreview
Sheets(SheetArray()).PrintOut
End Sub
Display More