+ Reply to Thread
Results 1 to 3 of 3

Need VBA to Reveal Control Buttons when a pair of conditions is met

  1. #1
    Registered User
    Join Date
    01-09-2019
    Location
    Chicago, IL
    MS-Off Ver
    2017
    Posts
    1

    Need VBA to Reveal Control Buttons when a pair of conditions is met

    Hello,

    I've found a few threads related to hiding/revealing control buttons based on a cell's value but have thus far been unable to translate that information into what I need my Excel sheet to do.

    My objective is to have one of two sets of control buttons appear given the combination of inputs in two separate cells.

    There are three conditions:
    1. The sales price is greater than zero and the system type chosen is "S".
    2. The sales price is greater than zero and the system type chosen is "F".
    3. Neither condition 1 or 2 is met.

    If condition 1 is met, three control buttons appear: a button that opens up a new PO form tab in the workbook, a button that opens up a new spec sheet tab for "S" systems in the workbook, and a button that runs a print screen macro for that "S" system spec.

    If condition 2 is met, three control buttons appear: the same PO button again, and two buttons for the "F" systems.

    If neither condition is met then all buttons remain hidden.

    My sample sheet is attached.
    The two variables are the dollar amount appearing in cell C2 and the selection chosen in cell C3.

    I appreciate any input.

    Thank you.

    ~MB
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor dotchiejack's Avatar
    Join Date
    05-21-2015
    Location
    Antwerp,Belgium
    MS-Off Ver
    2016
    Posts
    409

    Re: Need VBA to Reveal Control Buttons when a pair of conditions is met

    Crosspost https://chandoo.org/forum/threads/re...-is-met.40644/
    Click the * Add Reputation below to say thanks.

  3. #3
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2016
    Posts
    5,126

    Re: Need VBA to Reveal Control Buttons when a pair of conditions is met

    Hi ~MB,
    I think you can only get this to work using a macro.
    Name the buttons accordingly and then use a code in a worksheet vba like this:

    Please Login or Register  to view this content.
    Hope my explanation sheds a little light on if for you
    Hans
    "IT" Always crosses your path!
    May the (vba) code be with you... if it isn't; start debugging!
    If you like my answer, Click the * below to say thank-you ( It doesn't hurt )

+ 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