VB程序老是说变量未定义
ManualInputFlag=0Fori=0ToUBound(Curr_user_code)-1IfStrComp(Trim(CurrUserName),Trim(Cu...
ManualInputFlag = 0
For i = 0 To UBound(Curr_user_code) - 1
If StrComp(Trim(CurrUserName), Trim(Curr_user_code(i).sUserName), 1) = 0 Then
If Val(Curr_user_code(i).sPrivilegeCode2) = 1 Then '可以手工录入毛重和批重
ManualInputFlag = 1
Exit For
End If
End If
Next i
If ManualInputFlag = 1 Then
*** Lab_Gross.Visible = True
nTempGross_txt.Visible = True
Lab_dun1.Visible = True
Lab_Tare.Visible = True
nTempTare_txt.Visible = True
Lab_dun2.Visible = True
End If
这里面的ManualInputFlag已经定义过,但是运行程序时候说星号那句变量未定义( Lab_Gross.Visible = True),我想知道为什么未定义,怎么定义,还有那个GROSS在VB里是代表的那个变量,谢谢大家! 展开
For i = 0 To UBound(Curr_user_code) - 1
If StrComp(Trim(CurrUserName), Trim(Curr_user_code(i).sUserName), 1) = 0 Then
If Val(Curr_user_code(i).sPrivilegeCode2) = 1 Then '可以手工录入毛重和批重
ManualInputFlag = 1
Exit For
End If
End If
Next i
If ManualInputFlag = 1 Then
*** Lab_Gross.Visible = True
nTempGross_txt.Visible = True
Lab_dun1.Visible = True
Lab_Tare.Visible = True
nTempTare_txt.Visible = True
Lab_dun2.Visible = True
End If
这里面的ManualInputFlag已经定义过,但是运行程序时候说星号那句变量未定义( Lab_Gross.Visible = True),我想知道为什么未定义,怎么定义,还有那个GROSS在VB里是代表的那个变量,谢谢大家! 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询