+ Reply to Thread
Results 1 to 5 of 5

Macro-Button make tu hide?

  1. #1
    Registered User
    Join Date
    07-17-2005
    Posts
    10

    Macro-Button make tu hide?

    Hi,

    cann I the macro-button make to hide?
    Optional - dependent from the cell value.

    Please, don't say NO!

    Thenks
    F.Vergan

  2. #2
    STEVE BELL
    Guest

    Re: Macro-Button make tu hide?

    You probably can with the visible property. And do it in a macro.

    But a lot depends on what kind of button it is:
    toolbar
    forms toolbox
    control toolbox
    text box
    shape
    or built from a macro.

    Do you know about event macros?
    There is a way to capture the cell change...

    Tell us more...
    Where does the button come from (how did you build it)
    What changes the cell value (formula, manual entry, etc).
    What is it you really want to do...
    --
    steveB

    Remove "AYN" from email to respond
    "frenic" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi,
    >
    > cann I the macro-button make to hide?
    > Optional - dependent from the cell value.
    >
    > Please, don't say NO!
    >
    > Thenks
    > F.Vergan
    >
    >
    > --
    > frenic
    > ------------------------------------------------------------------------
    > frenic's Profile:
    > http://www.excelforum.com/member.php...o&userid=25297
    > View this thread: http://www.excelforum.com/showthread...hreadid=387878
    >




  3. #3
    Norman Jones
    Guest

    Re: Macro-Button make tu hide?

    Hi F,

    Assume the button is from the Forms Toolbar and is named "MyButton"
    Assume that A1 is the cell to be used to show/hide the buttom
    Assume that A1 contains a formula

    In the sheet module, paste the following event code:

    Private Sub Worksheet_Calculate()
    Me.Shapes("Button 1").Visible = _
    Range("A1").Value < 10 '<<====== CHANGE
    End Sub

    As this is worksheet event code, it should be placed in the worksheet
    module, not a standard module. Right-click the worksheet tab, select 'View
    Code' and paste te above code. Alt-F11 to return to the worksheet.

    Change the cell address (A1) and the test value (< 10) to suit your
    requirements.


    ---
    Regards,
    Norman



    "frenic" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi,
    >
    > cann I the macro-button make to hide?
    > Optional - dependent from the cell value.
    >
    > Please, don't say NO!
    >
    > Thenks
    > F.Vergan
    >
    >
    > --
    > frenic
    > ------------------------------------------------------------------------
    > frenic's Profile:
    > http://www.excelforum.com/member.php...o&userid=25297
    > View this thread: http://www.excelforum.com/showthread...hreadid=387878
    >




  4. #4
    Bob Phillips
    Guest

    Re: Macro-Button make tu hide?

    The question doesn' make an awful lot of sense. Can you try to re-phrase it,
    as to what sort of button, what you want to hide, and what the optional
    means in this context?

    --

    HTH

    RP
    (remove nothere from the email address if mailing direct)


    "frenic" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi,
    >
    > cann I the macro-button make to hide?
    > Optional - dependent from the cell value.
    >
    > Please, don't say NO!
    >
    > Thenks
    > F.Vergan
    >
    >
    > --
    > frenic
    > ------------------------------------------------------------------------
    > frenic's Profile:

    http://www.excelforum.com/member.php...o&userid=25297
    > View this thread: http://www.excelforum.com/showthread...hreadid=387878
    >




  5. #5
    Norman Jones
    Guest

    Re: Macro-Button make tu hide?

    Hi F,

    > Assume the button is from the Forms Toolbar and is named "MyButton"


    Should read:

    Assume the button is from the Forms Toolbar and is named "Button 1"

    ---
    Regards,
    Norman



    "Norman Jones" <[email protected]> wrote in message
    news:%[email protected]...
    > Hi F,
    >
    > Assume the button is from the Forms Toolbar and is named "MyButton"
    > Assume that A1 is the cell to be used to show/hide the buttom
    > Assume that A1 contains a formula
    >
    > In the sheet module, paste the following event code:
    >
    > Private Sub Worksheet_Calculate()
    > Me.Shapes("Button 1").Visible = _
    > Range("A1").Value < 10 '<<====== CHANGE
    > End Sub
    >
    > As this is worksheet event code, it should be placed in the worksheet
    > module, not a standard module. Right-click the worksheet tab, select 'View
    > Code' and paste te above code. Alt-F11 to return to the worksheet.
    >
    > Change the cell address (A1) and the test value (< 10) to suit your
    > requirements.
    >
    >
    > ---
    > Regards,
    > Norman
    >
    >
    >
    > "frenic" <[email protected]> wrote in
    > message news:[email protected]...
    >>
    >> Hi,
    >>
    >> cann I the macro-button make to hide?
    >> Optional - dependent from the cell value.
    >>
    >> Please, don't say NO!
    >>
    >> Thenks
    >> F.Vergan
    >>
    >>
    >> --
    >> frenic
    >> ------------------------------------------------------------------------
    >> frenic's Profile:
    >> http://www.excelforum.com/member.php...o&userid=25297
    >> View this thread:
    >> http://www.excelforum.com/showthread...hreadid=387878
    >>

    >
    >




+ 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