Hi
I want to use this code for several forms but when
I call the function I get an error that the variable
not defined and Controls is highlighted.
If I declare Controls as a variant var I get and
error 424 object required.
Is this possible?
I want to use this code for several forms but when
I call the function I get an error that the variable
not defined and Controls is highlighted.
If I declare Controls as a variant var I get and
error 424 object required.
Is this possible?
Code:
VB6
Function btnCheckOn(frmall As Form)
Dim BtnCmd As Control
For Each BtnCmd In Controls
If TypeOf BtnCmd Is CommandButton Then
BtnCmd.Enabled = True
End If
Next
End Function