ironfelix717
Registered User.
- Local time
- Yesterday, 19:16
- Joined
- Sep 20, 2019
- Messages
- 193
Hi,
I am struggling to call a function by it's name. The function resides in a form object, but CallByName() is struggling to locate the object.
The form "frmOperations" does exist, as well as the 'ClearFormHandler' function being present in that form's module.
The function is also public.
Thanks for any help.
EDIT:
So, if I specify the form as the internal keyword, it works.:
But i need to dynamically assign this, so I don't know how to do that.
Using the Forms or Form collection did not work either.
I am struggling to call a function by it's name. The function resides in a form object, but CallByName() is struggling to locate the object.
Code:
Dim frm As Form
Dim val As String
Set frm = Form("frmOperations")
val = CallByName(frm, "ClearFormHandler", VbMethod)
The form "frmOperations" does exist, as well as the 'ClearFormHandler' function being present in that form's module.
The function is also public.
Thanks for any help.
EDIT:
So, if I specify the form as the internal keyword, it works.:
Code:
Dim frm As Object
Set frm = Form_frmOperations
MsgBox CallByName(frm, "ClearFormHandler", VbMethod)
But i need to dynamically assign this, so I don't know how to do that.
Using the Forms or Form collection did not work either.
Last edited: