最后一句这里老是提醒我要求对象是啥问题?
Private Sub CommandButton1_Click()
Dim a As Integer 'a作为sheet变量
Dim b As Integer
Dim i As Integer
Dim w As Variant
Me.Label21.Caption = Me.TextBox6.Text
If Me.TextBox1.Text = "" Then
MsgBox "请输入姓名(单纯查录入条数,请点刷新)"
Else: For i = 1 To 31
If i = Me.TextBox6.Text Then '这句***也不不知道为什么要加2,反正加2正好对上
a = i + 4
Windows("加班录入系统V1.0.xlsm").Activate
activeWork.Sheets(a).Select
Private Sub CommandButton1_Click()
Dim a As Integer 'a作为sheet变量
Dim b As Integer
Dim i As Integer
Dim w As Variant
Me.Label21.Caption = Me.TextBox6.Text
If Me.TextBox1.Text = "" Then
MsgBox "请输入姓名(单纯查录入条数,请点刷新)"
Else: For i = 1 To 31
If i = Me.TextBox6.Text Then '这句***也不不知道为什么要加2,反正加2正好对上
a = i + 4
Windows("加班录入系统V1.0.xlsm").Activate
activeWork.Sheets(a).Select