unloading an indexed frame
Hello I have a main form with a protoype frame (index 0) with a few indexed buttons in it...I load in addition frames as needed:
Code:
If intFrameCount <> 0 Then Load FrameProto(intFrameCount)
With FrameProto(intFrameCount)
.Caption = strParsedstr(0)
.Left = strParsedstr(2)
etc
Now later on I want to kill off all of these loaded frames (basically so I can reload them with some slight updates--possibly a different number of radio buttons)...I don't need to kill frameProto(0), since it is there at design time.
but when I try to unload, say frame 1 (Unload FrameProto(1) ), I get error 365 unable to unload within this context....I tried doing it by a timer method , but same problem.
any ideas?
Re: unloading an indexed frame
I'm betting you first need to unload the controls it contains first...
Good Luck
Re: unloading an indexed frame
Bet won.
You can unload all controls on a frame (provided they are indexed, too) like:
Code:
Dim c As Control
For Each c in Me.Controls
If c.Container Is Frame(n) Then Unload c
Next