Results 1 to 2 of 2

Thread: Adding control to control array at run-time

  1. #1

    Thread Starter
    New Member
    Join Date
    Apr 2001
    Posts
    1
    Hi,

    At design-time I created two frames using a control array:

    - Frame1(0)
    - Frame1(1)

    Now I want to add a frame control to the control array at run-time using the following code:

    ----

    ' FrameNum is called as 2 (so it's a new frame)

    Load Frame1(FrameNum)
    Dim DayFrame As Frame
    Set DayFrame = Frame1(FrameNum)

    ----

    To make the new created frames visible I had to set the visible property to TRUE (Dayframe.Visible=TRUE).
    This didn't work however. The visible property of my Dayframe object is still FALSE.
    Why is my question...

    Can someone help me out with this?

    TIA.. Greetz Johan

  2. #2
    MerryVIP
    Guest
    Try it like this

    Code:
        Dim DayFrame as Frame 'This inside a sub or in general
        '...
        FrameNum = Frame1.Count
        Load Frame1(FrameNum)
        Frame1(FrameNum).Visible = True
        Set DayFrame As Frame1(FrameNum)
        '...
    I guess this isn't actually what you are asking...You could also mean to make it visible somewhere else? If you do, try placing DayFrame in general instead of sub.

    Hope this was somehow useful,

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width