aThis is the code:
Private Sub CheckBox1_Click()
Dim iloop As Integer
For iloop = 1 To ListBox1.ListCount
ListBox1.Selected(iloop - 1) = CheckBox1.Value
Next
End Sub
Private Sub CommandButton1_Click()
Unload Me
End Sub
Private Sub CommandButton2_Click()
Dim iloop As Integer
For iloop = 1 To ListBox1.ListCount
If ListBox1.Selected(iloop - 1) = True Then
'|||||||||||||||||||||||||||||||||||||||||||||
Sheets(ListBox1.List(iloop - 1, 0)).PrintOut '(Change this part to load text files)
'|||||||||||||||||||||||||||||||||||||||||||||
ListBox1.Selected(iloop - 1) = False
End If
Next
'ActiveWorkbook.Connections("test_data").Refresh
End Sub
Private Sub UserForm_Initialize()
Dim sSheet
For Each sSheet In Sheets(Array("Z00", "Z01", "Z02", "Z03", "Z04", "Z05", "Z06", "Z07", _
"Z08", "Z09", "Z10"))
ListBox1.AddItem sSheet.Name
Next sSheet
End Sub