+ Reply to Thread
Results 1 to 8 of 8

Visible/Invisible Several Button, 3 Criteria

  1. #1
    Registered User
    Join Date
    02-08-2010
    Location
    Ghana
    MS-Off Ver
    Excel 2010
    Posts
    48

    Talking Visible/Invisible Several Button, 3 Criteria

    Hello Happy Day to All

    i have a new challenge
    i want to visible/invisible the button in 3 criteria
    my challenge is how can i apply that in 50 button
    Please see the attached file

    Thank YOU in ADVANCE
    Attached Files Attached Files

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: Visible/Invisible Several Button, 3 Criteria

    Hello blues_oo7,

    This proved to be an interesting challenge. It seemed straightforward in the beginning but took some unexpected turns. User Defined Functions are tricky. When run in VB environment there are no restrictions. However, when used on a worksheet, things get interesting.

    To make this hide an unhide the button, the UDF have to be made volatile. Rather than executing when needed, it is executed every time a formula on the worksheet is recalculated. This can slow you down.

    The UDF takes four arguments: The Button Index Number, the column "F" cell, the column "D" cell, and $G$2. The UDF returns either TRUE or a Blank. The UDF formula is behind each button.

    Here is the UDF code:
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Registered User
    Join Date
    02-08-2010
    Location
    Ghana
    MS-Off Ver
    Excel 2010
    Posts
    48

    Re: Visible/Invisible Several Button, 3 Criteria

    Hi Sir Leith Ross

    Thanks for giving time on my challenge,

    but the other button is not visible even the status is not PAID
    sample cell I7,I10,I12,I15,I17 AND I20 the status is not PAID but the paid button is invisible
    and i want the other button to be hide from I22 to I53 coz the D22 to D53 cell is blank

    Thank you for your support and patience, i am totally noob in VBA

    Thanks again,
    blues_oo7

  4. #4
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: Visible/Invisible Several Button, 3 Criteria

    Hello blues_oo7,

    What other buttons? I only saw "PAID" buttons on the worksheet.

  5. #5
    Registered User
    Join Date
    02-08-2010
    Location
    Ghana
    MS-Off Ver
    Excel 2010
    Posts
    48

    Re: Visible/Invisible Several Button, 3 Criteria

    sir the paid button on cell I7,I10,I12,I15,I17 AND I20

    thank you

  6. #6
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: Visible/Invisible Several Button, 3 Criteria

    I think this one-liner suffices:

    Please Login or Register  to view this content.
    Attached Files Attached Files



  7. #7
    Registered User
    Join Date
    02-08-2010
    Location
    Ghana
    MS-Off Ver
    Excel 2010
    Posts
    48

    Re: Visible/Invisible Several Button, 3 Criteria

    Sir snb thanks for the reply,

    Sir not fit for my need, i need to hide button for three criteria

    Please help

  8. #8
    Registered User
    Join Date
    02-08-2010
    Location
    Ghana
    MS-Off Ver
    Excel 2010
    Posts
    48

    Re: Visible/Invisible Several Button, 3 Criteria

    *BUMP*
    Please Help

+ 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