+ Reply to Thread
Results 1 to 6 of 6

Hide or Unhide Command Button Question

  1. #1
    Valued Forum Contributor unit285's Avatar
    Join Date
    10-29-2015
    Location
    TN
    MS-Off Ver
    Office 365
    Posts
    358

    Hide or Unhide Command Button Question

    First of all I am a complete novice at VBA Macros.
    So I have 2 buttons at the top of my sheet. One says "Hide" and the other says "Unhide" If any cells in the same row of columns B AND C equal 0 then I want the button to Hide those entire rows. If a cell in B4 has a value of 0 but C4 has a value of 1 then it should not hide. Only if cells in the same row of columns B & C = 0 should the macro hide that row. Obviously the other button would unhide them. Here is what I have so far, My problem seems to be that I don't know how to code the macro to read the entire columns of B & C. Any help is greatly appreciated!

    Please Login or Register  to view this content.
    Last edited by unit285; 11-16-2015 at 05:27 PM.

  2. #2
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,892

    Re: Hide or Unhide Command Button Question

    Try this
    Please Login or Register  to view this content.
    < ----- Please click the little star * next to add reputation if my post helps you
    Visit Forum : From Here

  3. #3
    Valued Forum Contributor unit285's Avatar
    Join Date
    10-29-2015
    Location
    TN
    MS-Off Ver
    Office 365
    Posts
    358

    Re: Hide or Unhide Command Button Question

    It did not work. I will attach a test page here so you can see what I am working with.

    Grader.xlsx

  4. #4
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,892

    Re: Hide or Unhide Command Button Question

    Try the attachment
    The problem is that you have merged cells
    Attached Files Attached Files

  5. #5
    Valued Forum Contributor unit285's Avatar
    Join Date
    10-29-2015
    Location
    TN
    MS-Off Ver
    Office 365
    Posts
    358

    Re: Hide or Unhide Command Button Question

    That is PERFECT! Thank You so much!

  6. #6
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,892

    Re: Hide or Unhide Command Button Question

    You're welcome. Thanks for the feedback

+ 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. Hide/Unhide Command Button using CheckBox
    By Dbeethekidd in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-13-2014, 01:18 PM
  2. Command Button - Hide and Unhide Sheet VBA
    By Kimber20 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 03-09-2014, 11:06 AM
  3. Using command button to hide/unhide worksheets
    By Sly1980 in forum Excel General
    Replies: 1
    Last Post: 05-31-2012, 03:44 PM
  4. Password protected command button to protect/unprotect and hide/unhide
    By cpercival in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-07-2011, 03:27 PM
  5. Command button to Hide a tab and unhide a tab with a password
    By nik63 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-08-2011, 07:24 PM
  6. Hide/Unhide Combo box via command button
    By staples in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-20-2009, 06:15 AM
  7. Command Button to Hide/Unhide Rows
    By Bea in forum Excel General
    Replies: 4
    Last Post: 03-16-2006, 11:21 AM

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