|
-
Aug 15th, 2000, 12:11 PM
#4
Why don't you pass object variables?
Instead of passing strings, you can pass a Form and a Control object. Even stronger: if you pass a reference to the control, you don't need to pass the form.
eg
Public Function fcnTest(MyControl As Control) As String
fcnTest = MyControl.Tag
End function
You could call the function like this:
strSomething = fcnTest(frmMain.ctlPushButton)
or like this
strSomething = fcnTest(Screen.ActiveControl)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|