S
suee
HI, im writing code for a form, when the user clicks on OK, I want th
selected sheets that were checked to be printed. Was hoping you coul
help with the code to do this.
Private Sub OKButton_Click()
'insert code here.....................
For i = 0 To ListBox1.ListCount - 1
If ListBox1.Selected(i) Then
With Sheets(ListBox1.List(i))
.PageSetup.PrintGridlines = cbGridlines
If obLandscape Then .PageSetup.Orientation
xlLandscape
If obPortrait Then .PageSetup.Orientation = xlPortrait
' .PrintOut
End With
End If
Next i
Unload Me
End Su
selected sheets that were checked to be printed. Was hoping you coul
help with the code to do this.
Private Sub OKButton_Click()
'insert code here.....................
For i = 0 To ListBox1.ListCount - 1
If ListBox1.Selected(i) Then
With Sheets(ListBox1.List(i))
.PageSetup.PrintGridlines = cbGridlines
If obLandscape Then .PageSetup.Orientation
xlLandscape
If obPortrait Then .PageSetup.Orientation = xlPortrait
' .PrintOut
End With
End If
Next i
Unload Me
End Su