I have a sample piece of code to look at a screen control
and report on its properties. For example:
Public Function fcnTest(strForm As String, _
strControl As String) As String
fcnTest = strScreen.strControl.Tag
End function
The problem comes in trying to get VB to replace strScreen and strControl with the form name and control name that is
stored in each variable. So, if one calls the function like
thus:
strSomething = fcnTest("frmMain", "ctlPushButton")
Inside my sample function should look like this, to VB
any how after the compiler get through with it:
Public Function fcnTest(strForm As String, _
strControl As String) As String
fcnTest = frmMain.cltPushButton.Tag
End Function
I am getting compile and run time errors.
Can anyone help me with this truly basic, too basic, query?
Thanks.




Reply With Quote