Dim I As Long, J As Long
Dim Ar, Br
Dim S As String
If OptionButton1.Value = True Then
For I = 3 To Sheets.Count
Sheets(I).PrintOut
Next
Else
S = TextBox1.Text
If InStr(S, ",") = 0 Then
Sheets(Val(S) + 2).PrintOut
Else
Ar = Split(S, ",")
For I = 0 To UBound(Ar)
If InStr(Ar(I), "-") = 0 Then
Sheets(Val(Ar(I)) + 2).PrintOut
Else
Br = Split(Ar(I), "-")
For J = Br(0) To Br(1)
Sheets(J + 2).PrintOut
Next
End If
Next
End If
End If
End Sub
Private Sub CommandButton2_Click()
End
End Sub
窗体标题,你点下窗体空白的地方,然后左边属性里面找到 caption 就可以了,跟其他控件一样的。