+ 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
    507

    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 2021 (Windows)
    Posts
    7,905

    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

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Form Control Buttons
    By Nickmsi in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 05-23-2017, 04:37 PM
  2. [SOLVED] Convert Single Pair of Columns to 3 Column (Pair) List
    By kencoburn in forum Excel General
    Replies: 7
    Last Post: 03-04-2017, 01:43 PM
  3. [SOLVED] Deslecting control buttons
    By Yoepy in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-22-2015, 08:32 PM
  4. Finding first five items in a pair of lists under specific conditions
    By david.aukerman in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-13-2013, 11:27 AM
  5. Excel 2007 : control buttons
    By hellsbells45 in forum Excel General
    Replies: 1
    Last Post: 03-14-2009, 01:03 AM
  6. Cut or Hid control buttons
    By pingwin77 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-04-2009, 02:10 AM
  7. Control Buttons
    By Truthseeker1 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 07-18-2008, 03:16 PM

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