+ Reply to Thread
Results 1 to 7 of 7

Active X Check Box that will perform certain macros based upon cell values

  1. #1
    Registered User
    Join Date
    09-04-2013
    Location
    United States
    MS-Off Ver
    Excel 2011
    Posts
    13

    Active X Check Box that will perform certain macros based upon cell values

    Hi Guys,

    I am somewhat a novice with VBA/Macros, that pretty much learns from trial and error, but I can't seem to figure this one out!

    Objective:
    I want a ActiveX Checkbox that will do the following when checked:
    It needs to do 2 different functions based upon the value input in cells Q4:R4.

    1. if cell Q4:R4 value = 1, hide rows 48 through 48 and perform a formula (type "Yes" in C73:D73)
    2. if cell Q4:R4 value <1, do not hide rows and perform formula (type "Yes" in C73:D73)

    Unchecked:
    Reset the above functions...

    Thanks for your time!


    #
    Please Login or Register  to view this content.
    #
    Last edited by JBeaucaire; 01-05-2014 at 08:16 PM. Reason: Added missing CODE tags. Please stop and read the Forum Rules, link in the menu bar above. Thanks.

  2. #2
    Forum Expert millz's Avatar
    Join Date
    08-14-2013
    Location
    Singapore
    MS-Off Ver
    Excel, Access 2016
    Posts
    1,694

    Re: Active X Check Box that will perform certain macros based upon cell values

    Quote Originally Posted by houseflipsheet View Post
    1. if cell Q4:R4 value = 1, hide rows 48 through 48 and perform a formula (type "Yes" in C73:D73)
    2. if cell Q4:R4 value <1, do not hide rows and perform formula (type "Yes" in C73:D73)
    By this, do you mean the sum of the values of the 2 cells = 1? or value of both individual cell = 1?
    多么想要告诉你 我好喜欢你

  3. #3
    Registered User
    Join Date
    09-04-2013
    Location
    United States
    MS-Off Ver
    Excel 2011
    Posts
    13

    Re: Active X Check Box that will perform certain macros based upon cell values

    No, Q4 and R4 are merged, so it really is just the value of the cell q4.

  4. #4
    Forum Expert millz's Avatar
    Join Date
    08-14-2013
    Location
    Singapore
    MS-Off Ver
    Excel, Access 2016
    Posts
    1,694

    Re: Active X Check Box that will perform certain macros based upon cell values

    So I assume C73:D73 is merged as well, try this.

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    09-04-2013
    Location
    United States
    MS-Off Ver
    Excel 2011
    Posts
    13

    Re: Active X Check Box that will perform certain macros based upon cell values

    Hi Millz,

    Thank you this works great!...There is one small issue that I'm having...

    If a user clicks the Checkbox before typing in the value into Q4, then the rows do not get hidden.

    For example, if the checkbox is checked, and a user inputs a value of 1 (100%) into Q4 then the Rows (47:48) do not get hidden.

    Also, if someone changes the value from a 1 to a <1 number the spreadsheet doesn't unhide the rows...

    Please let me know if there is a solution for this. See the attached screenshot which might help get an idea of what I am doing.Attachment 287761

    Thanks again for your time!Homeowner Offer Report Help Screenshot.png

  6. #6
    Forum Expert millz's Avatar
    Join Date
    08-14-2013
    Location
    Singapore
    MS-Off Ver
    Excel, Access 2016
    Posts
    1,694

    Re: Active X Check Box that will perform certain macros based upon cell values

    If you want it to be changed on changing of values as well, you will need the worksheet change event code.

    Try placing this in the worksheet's code, should be Homeowner Offer Report worksheet.
    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    09-04-2013
    Location
    United States
    MS-Off Ver
    Excel 2011
    Posts
    13

    Re: Active X Check Box that will perform certain macros based upon cell values

    Yep, works like a charm!...

    Thank you so much for your help!

    Dave

+ 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. Replies: 2
    Last Post: 03-12-2013, 04:10 PM
  2. Replies: 7
    Last Post: 03-10-2012, 01:45 PM
  3. Replies: 2
    Last Post: 03-29-2011, 10:53 AM
  4. Change cell values based on Active Cell Address in Excel 2007 with no VBA
    By bdmistri in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-07-2009, 02:01 PM
  5. Open a workbook and run 1 of 4 macros based on 3 cell values
    By duugg in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 08-05-2009, 10:12 PM

Tags for this Thread

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