Logo 
Search:

MS Office Forum

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds

Dynamic userform - create nested frames?

  Asked By: Waldemar    Date: Oct 15    Category: MS Office    Views: 1537
  

I'm trying to create a userform that will display a nested set of
rules inside frames - each frame containing a set of rules.

What happens is if a user clicks on cmdCreate button it creates the
first frame:


Set frameNewRule = frameRule.Controls.Add("forms.frame.1", "frameRule"
& cntRule)


Where frameRule = a frame already on the userform. This part isnt the
problem, what I would like then is to create another dynamic frame
inside that frame but when I try to reference it, I get object not
found errors.

I've tried multiple different combos to no success - my vba is
limited, but here's what I've tried so I have a frame inside that frame:
Set frameNewRule = frameNewRule.Controls.Add("forms.frame.1",
"frameRule" & cntRule)

Set frameNewRule = Me.controls("frameRule" &
cntRule).Controls.Add("forms.frame.1", "frameRule" & cntRule)

Set frameNewRule = Me.controls("frameRule" &
cntRule).Add("forms.frame.1", "frameRule" & cntRule)

Set frameNewRule = form_Test!("frameRule" &
cntRule).Controls.Add("forms.frame.1", "frameRules" & cntRule)
I really thought the first would of worked?

Is there any possible way to dynamically create a new frame inside a
frame that was dynamically created previously?

Please let me know if I'm not being clear enough?

Share: 

 

1 Answer Found

 
Answer #1    Answered By: Rickey Scott     Answered On: Oct 15

With the way the message tree works here on the group, I'm
uncertain if you got an answer to your question. I would be
interested in the answer, since I've been looking at a similar
structure for something I'm working on here . . . or, if you haven't
gotten an answer to what you asked, let me know and I'll look
forward to fussing thru it until we get it to work.

 
Didn't find what you were looking for? Find more on Dynamic userform - create nested frames? Or get search suggestion and latest updates.




Tagged: