G
Guest
I have an MDI form with similar child edit forms. The child Edit forms have
public methods that of consistent names. I have a tool bar that calls these
methods. Here's how I'm doing it now (toolbar click event).
1) Dim f As Object
2) Select Case Trim$(ActiveMdiChild.Text)
3) f = CType(ActiveMdiChild, <Hard Coded Valid Form Object Based On Case>)
4) f.<Public Method>
Now, I know that I could use an inherited form, but for a number of reasons,
I am trying to stay awau from that. I was hoping to extract the type from
ACTIVEMDICHILD and use that in my CType statement to eliminate the Select
Cases, but I can not find a Syntax that works.
I've tried things like
f = CType(ActiveMdiChild, ActiveMdiChild.GetType)
etc....
Any help?
public methods that of consistent names. I have a tool bar that calls these
methods. Here's how I'm doing it now (toolbar click event).
1) Dim f As Object
2) Select Case Trim$(ActiveMdiChild.Text)
3) f = CType(ActiveMdiChild, <Hard Coded Valid Form Object Based On Case>)
4) f.<Public Method>
Now, I know that I could use an inherited form, but for a number of reasons,
I am trying to stay awau from that. I was hoping to extract the type from
ACTIVEMDICHILD and use that in my CType statement to eliminate the Select
Cases, but I can not find a Syntax that works.
I've tried things like
f = CType(ActiveMdiChild, ActiveMdiChild.GetType)
etc....
Any help?