+ Reply to Thread
Results 1 to 3 of 3

Hide/Unhide Form Control

  1. #1
    qwerty
    Guest

    Hide/Unhide Form Control

    I have a forms checkbox control on a worksheet. Control is title "cbLOC".
    Based on the selection of a dropdown box, I want this control to show or not
    show.

    Right now I have created a text box slightly larger than the control and
    superimposed over top of the checkbox.

    The plan is to send the checkbox control to the foreground when it needs to
    be available otherwise hide it in the background by sending it to the back.

    Code at the moment is Sheets("Inputs").Shapes("cbLOC").ShapeRange.ZOrder
    msoSendToBack

    I get a runtime error 438. Do I need to force it into "Design Mode" and how
    do I do that?

    Is there any way to simply hide the control rather than covering it up?



  2. #2
    Forum Contributor
    Join Date
    03-15-2005
    Location
    North Carolina
    MS-Off Ver
    2003 & 2007
    Posts
    180
    Me.cbLoc.Visible = False

  3. #3
    Bob Phillips
    Guest

    Re: Hide/Unhide Form Control

    This will toggle it

    With Sheets("Inputs").Shapes("cbLOC")
    .Visible = Not .Visible
    End With


    --
    HTH

    Bob Phillips

    (replace somewhere in email address with gmail if mailing direct)

    "qwerty" <[email protected]> wrote in message
    news:[email protected]...
    > I have a forms checkbox control on a worksheet. Control is title "cbLOC".
    > Based on the selection of a dropdown box, I want this control to show or

    not
    > show.
    >
    > Right now I have created a text box slightly larger than the control and
    > superimposed over top of the checkbox.
    >
    > The plan is to send the checkbox control to the foreground when it needs

    to
    > be available otherwise hide it in the background by sending it to the

    back.
    >
    > Code at the moment is Sheets("Inputs").Shapes("cbLOC").ShapeRange.ZOrder
    > msoSendToBack
    >
    > I get a runtime error 438. Do I need to force it into "Design Mode" and

    how
    > do I do that?
    >
    > Is there any way to simply hide the control rather than covering it up?
    >
    >




+ 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