+ Reply to Thread
Results 1 to 6 of 6

Controls in a Frame

  1. #1
    JIPS
    Guest

    Controls in a Frame

    I'm having trouble putting controls into a frame. The way I understand it, I
    should be able to either paste controls in or create them in a frame
    directly. Neither works for me. I'm using Excel 2003 and when I attempt to
    do it, the control will not go into the frame, it will go either over or
    under it, I move the frame around and the control stays where it is. Am I
    doing this wrong? Any ideas what I can do to make it work? BTW, when I say
    control I mean textbox, radiobutton, etc.

    Any help would be great!



  2. #2
    JIPS
    Guest

    Re: Controls in a Frame


    "JIPS" <[email protected]> wrote in message
    news:[email protected]...
    > I'm having trouble putting controls into a frame. The way I understand it,
    > I should be able to either paste controls in or create them in a frame
    > directly. Neither works for me. I'm using Excel 2003 and when I attempt to
    > do it, the control will not go into the frame, it will go either over or
    > under it, I move the frame around and the control stays where it is. Am I
    > doing this wrong? Any ideas what I can do to make it work? BTW, when I say
    > control I mean textbox, radiobutton, etc.
    >
    > Any help would be great!


    Also, if it makes any difference, this is on a worksheet, not in a form.

    Thanks.



  3. #3
    Tom Ogilvy
    Guest

    Re: Controls in a Frame

    Frames are not really supported on a worksheet (plus they look like crap).

    I know how to get the control on the frame, but once it is there you can't
    do anything with it - their events are not exposed. Anyway once you have the
    frame on the worksheet and you are in design mode, right click on the frame
    to get a popup window. Then select Frame object and then Edit and a new
    Control toolbox toolbar will appear (the same one you see in the vbe) next to
    the frame. You can use controls from there and they will be placed on the
    frame.


    The reason it isn't on the control toolbar by default is because, as I said,
    it really isn't supported.

    --
    Regards,
    Tom Ogilvy


    "JIPS" wrote:

    >
    > "JIPS" <[email protected]> wrote in message
    > news:[email protected]...
    > > I'm having trouble putting controls into a frame. The way I understand it,
    > > I should be able to either paste controls in or create them in a frame
    > > directly. Neither works for me. I'm using Excel 2003 and when I attempt to
    > > do it, the control will not go into the frame, it will go either over or
    > > under it, I move the frame around and the control stays where it is. Am I
    > > doing this wrong? Any ideas what I can do to make it work? BTW, when I say
    > > control I mean textbox, radiobutton, etc.
    > >
    > > Any help would be great!

    >
    > Also, if it makes any difference, this is on a worksheet, not in a form.
    >
    > Thanks.
    >
    >
    >


  4. #4
    JIPS
    Guest

    Re: Controls in a Frame

    Tom, thanks a lot. Not what I wanted to hear, but definately what I need to
    hear. Much appreciated.

    I guess I'm approaching this from the wrong way then. Is there a good way to
    hide and unhide different groups of controls on a worksheet? I was thinking
    I would do it by turning the visibility on and off on a frame, but that
    isn't going to work.


    "Tom Ogilvy" <[email protected]> wrote in message
    news:[email protected]...
    > Frames are not really supported on a worksheet (plus they look like crap).
    >
    > I know how to get the control on the frame, but once it is there you can't
    > do anything with it - their events are not exposed. Anyway once you have
    > the
    > frame on the worksheet and you are in design mode, right click on the
    > frame
    > to get a popup window. Then select Frame object and then Edit and a new
    > Control toolbox toolbar will appear (the same one you see in the vbe) next
    > to
    > the frame. You can use controls from there and they will be placed on the
    > frame.
    >
    >
    > The reason it isn't on the control toolbar by default is because, as I
    > said,
    > it really isn't supported.
    >
    > --
    > Regards,
    > Tom Ogilvy
    >
    >
    > "JIPS" wrote:
    >
    >>
    >> "JIPS" <[email protected]> wrote in message
    >> news:[email protected]...
    >> > I'm having trouble putting controls into a frame. The way I understand
    >> > it,
    >> > I should be able to either paste controls in or create them in a frame
    >> > directly. Neither works for me. I'm using Excel 2003 and when I attempt
    >> > to
    >> > do it, the control will not go into the frame, it will go either over
    >> > or
    >> > under it, I move the frame around and the control stays where it is. Am
    >> > I
    >> > doing this wrong? Any ideas what I can do to make it work? BTW, when I
    >> > say
    >> > control I mean textbox, radiobutton, etc.
    >> >
    >> > Any help would be great!

    >>
    >> Also, if it makes any difference, this is on a worksheet, not in a form.
    >>
    >> Thanks.
    >>
    >>
    >>




  5. #5
    Tom Ogilvy
    Guest

    Re: Controls in a Frame

    Perhaps you could name them

    grp1Combobox1
    grp1Textbox1
    grp1Textbox2


    for each ole in activesheet.OleObjects
    if lcase(left(ole.Name,4)) = "grp1" then
    ole.Visible = True
    else
    ole.visible = False
    end if
    Next

    --
    Regards,
    Tom Ogilvy


    "JIPS" wrote:

    > Tom, thanks a lot. Not what I wanted to hear, but definately what I need to
    > hear. Much appreciated.
    >
    > I guess I'm approaching this from the wrong way then. Is there a good way to
    > hide and unhide different groups of controls on a worksheet? I was thinking
    > I would do it by turning the visibility on and off on a frame, but that
    > isn't going to work.
    >
    >
    > "Tom Ogilvy" <[email protected]> wrote in message
    > news:[email protected]...
    > > Frames are not really supported on a worksheet (plus they look like crap).
    > >
    > > I know how to get the control on the frame, but once it is there you can't
    > > do anything with it - their events are not exposed. Anyway once you have
    > > the
    > > frame on the worksheet and you are in design mode, right click on the
    > > frame
    > > to get a popup window. Then select Frame object and then Edit and a new
    > > Control toolbox toolbar will appear (the same one you see in the vbe) next
    > > to
    > > the frame. You can use controls from there and they will be placed on the
    > > frame.
    > >
    > >
    > > The reason it isn't on the control toolbar by default is because, as I
    > > said,
    > > it really isn't supported.
    > >
    > > --
    > > Regards,
    > > Tom Ogilvy
    > >
    > >
    > > "JIPS" wrote:
    > >
    > >>
    > >> "JIPS" <[email protected]> wrote in message
    > >> news:[email protected]...
    > >> > I'm having trouble putting controls into a frame. The way I understand
    > >> > it,
    > >> > I should be able to either paste controls in or create them in a frame
    > >> > directly. Neither works for me. I'm using Excel 2003 and when I attempt
    > >> > to
    > >> > do it, the control will not go into the frame, it will go either over
    > >> > or
    > >> > under it, I move the frame around and the control stays where it is. Am
    > >> > I
    > >> > doing this wrong? Any ideas what I can do to make it work? BTW, when I
    > >> > say
    > >> > control I mean textbox, radiobutton, etc.
    > >> >
    > >> > Any help would be great!
    > >>
    > >> Also, if it makes any difference, this is on a worksheet, not in a form.
    > >>
    > >> Thanks.
    > >>
    > >>
    > >>

    >
    >
    >


  6. #6
    JIPS
    Guest

    Re: Controls in a Frame

    Tom, thanks so much!

    That will work perfectly. Very much appreciated!!!


    "Tom Ogilvy" <[email protected]> wrote in message
    news:[email protected]...
    > Perhaps you could name them
    >
    > grp1Combobox1
    > grp1Textbox1
    > grp1Textbox2
    >
    >
    > for each ole in activesheet.OleObjects
    > if lcase(left(ole.Name,4)) = "grp1" then
    > ole.Visible = True
    > else
    > ole.visible = False
    > end if
    > Next
    >
    > --
    > Regards,
    > Tom Ogilvy
    >
    >
    > "JIPS" wrote:
    >
    >> Tom, thanks a lot. Not what I wanted to hear, but definately what I need
    >> to
    >> hear. Much appreciated.
    >>
    >> I guess I'm approaching this from the wrong way then. Is there a good way
    >> to
    >> hide and unhide different groups of controls on a worksheet? I was
    >> thinking
    >> I would do it by turning the visibility on and off on a frame, but that
    >> isn't going to work.
    >>
    >>
    >> "Tom Ogilvy" <[email protected]> wrote in message
    >> news:[email protected]...
    >> > Frames are not really supported on a worksheet (plus they look like
    >> > crap).
    >> >
    >> > I know how to get the control on the frame, but once it is there you
    >> > can't
    >> > do anything with it - their events are not exposed. Anyway once you
    >> > have
    >> > the
    >> > frame on the worksheet and you are in design mode, right click on the
    >> > frame
    >> > to get a popup window. Then select Frame object and then Edit and a
    >> > new
    >> > Control toolbox toolbar will appear (the same one you see in the vbe)
    >> > next
    >> > to
    >> > the frame. You can use controls from there and they will be placed on
    >> > the
    >> > frame.
    >> >
    >> >
    >> > The reason it isn't on the control toolbar by default is because, as I
    >> > said,
    >> > it really isn't supported.
    >> >
    >> > --
    >> > Regards,
    >> > Tom Ogilvy
    >> >
    >> >
    >> > "JIPS" wrote:
    >> >
    >> >>
    >> >> "JIPS" <[email protected]> wrote in message
    >> >> news:[email protected]...
    >> >> > I'm having trouble putting controls into a frame. The way I
    >> >> > understand
    >> >> > it,
    >> >> > I should be able to either paste controls in or create them in a
    >> >> > frame
    >> >> > directly. Neither works for me. I'm using Excel 2003 and when I
    >> >> > attempt
    >> >> > to
    >> >> > do it, the control will not go into the frame, it will go either
    >> >> > over
    >> >> > or
    >> >> > under it, I move the frame around and the control stays where it is.
    >> >> > Am
    >> >> > I
    >> >> > doing this wrong? Any ideas what I can do to make it work? BTW, when
    >> >> > I
    >> >> > say
    >> >> > control I mean textbox, radiobutton, etc.
    >> >> >
    >> >> > Any help would be great!
    >> >>
    >> >> Also, if it makes any difference, this is on a worksheet, not in a
    >> >> form.
    >> >>
    >> >> Thanks.
    >> >>
    >> >>
    >> >>

    >>
    >>
    >>




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1