Thread: Print Macro
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
LaraBee LaraBee is offline
external usenet poster
 
Posts: 1
Default Print Macro


I want to print an array of sheets that are selected by check boxes so
the pages print in order. Here is my code, but I get an error in the
array, can someone help with this? Thanks!!

Private Sub Cmd_Print_Click()

Dim A As String
Dim B As String
Dim C As String

If CheckBox1.Value = True Then
A = "Sheet1"
End If
If CheckBox2.Value = True Then
B = "Sheet2"
End If
If CheckBox3.Value = True Then
C = "Sheet3"
End If

F = A & B & C

Sheets(Array(F)).Select
ActiveWindow.SelectedSheets.PrintOut

End Sub


--
LaraBee
------------------------------------------------------------------------
LaraBee's Profile: http://www.excelforum.com/member.php...o&userid=30275
View this thread: http://www.excelforum.com/showthread...hreadid=499436