避免控件变量在赋值前被使用?!
你们怎样避免控件变量在赋值前被使用?
又不给进行Nothing 判断,象下面这样还是被警告的。
Dim A As GroupBox
If A IsNot Nothing and GroupBox.name="MyGroupBox" Then
'some thine
End If
结果我就添加了一个完全没有使用的空的GroupBox。名为“EMPTYGroupBox"
再这么干:
Dim A As GroupBox
A=EMPTYGroupBox
If GroupBox.name="MyGroupBox" Then
'some thine
End If
除此有什么高招吗?