+ Reply to Thread
Results 1 to 5 of 5

Hiding columns and checkbox

  1. #1
    Registered User
    Join Date
    04-29-2019
    Location
    Hampshire, England
    MS-Off Ver
    2018
    Posts
    43

    Hiding columns and checkbox

    Is there a simple way to hide columns and a checkbox at the same time using an additional checkbox?

    I already have the following working to hide the columns with a checkbox, but the checkbox with in the column seems to stay and I can't seem to get it to hide as well.

    Sub RiskAssess_Click()
    Columns("C:G").EntireColumn.Hidden = Not Range("A4").Value
    End Sub

  2. #2
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,767

    Re: Hiding columns and checkbox

    Add the below line of code in your macro

    ActiveSheet.Shapes("CheckBox1").Visible = False

    Replace CheckBox1 with your checkbox name. Also, replace the Activesheet with your desired Sheet.


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  3. #3
    Registered User
    Join Date
    04-29-2019
    Location
    Hampshire, England
    MS-Off Ver
    2018
    Posts
    43

    Re: Hiding columns and checkbox

    I have tried what you suggested but unable to get it to work. I have added a simple example sheet to this post so you can see where i'm going wrong and correct me hopefully.
    Attached Files Attached Files

  4. #4
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,767

    Re: Hiding columns and checkbox

    Replace this line of code

    Please Login or Register  to view this content.
    With

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    04-29-2019
    Location
    Hampshire, England
    MS-Off Ver
    2018
    Posts
    43

    Re: Hiding columns and checkbox

    Hi,

    It isn't "Check Box 7" that I am trying to hide. I am trying to use Check box 7 to hide columns C:G and the "Total colour only" check box.

+ 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. Hiding Specific Cells thru Checkbox
    By JasonKid1 in forum Excel General
    Replies: 3
    Last Post: 04-23-2014, 11:54 AM
  2. Need VBA for hiding checkbox in excel
    By dhivyamohan in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-06-2013, 08:26 AM
  3. Using CASE and hiding a checkbox
    By uncleslinky in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-05-2013, 05:57 AM
  4. [SOLVED] Looking for some help on hiding columns based on checkbox selection
    By Spritz in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 06-07-2013, 10:38 AM
  5. Hide a checkbox when hiding the row it is in
    By GuruWannaB in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-12-2008, 01:40 PM
  6. Hide a checkbox when hiding the row it is in
    By MacD in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-11-2008, 07:55 PM
  7. hiding rows with checkbox
    By Qaspec in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-26-2005, 05:19 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