+ Reply to Thread
Results 1 to 2 of 2

Hide/visually block sections of a spreadsheet based on a checkbox?

Hybrid View

  1. #1
    Registered User
    Join Date
    08-29-2018
    Location
    Earth
    MS-Off Ver
    Professional Plus 2016
    Posts
    1

    Hide/visually block sections of a spreadsheet based on a checkbox?

    For example, if I make a checkbox labelled "N/A", and it's checked, rows 40-50 will have some visual indicator that they're N/A (e.g. partially transparent window, line out).

    If it's not possible with a checkbox, is there another way to do it?

  2. #2
    Forum Expert
    Join Date
    11-27-2007
    Location
    New Jersey, USA
    MS-Off Ver
    2013
    Posts
    1,669

    Re: Hide/visually block sections of a spreadsheet based on a checkbox?

    See attached example.
    You can change the Rows selection from "5:8" to other range.
    Hope this helps.

    Sub Hide()
    '
    '
    
    '
        If ActiveSheet.Range("B1").Value Then
        
            Rows("5:8").Select
            With Selection.Interior
                .Pattern = xlSolid
                .PatternColorIndex = xlAutomatic
                .ThemeColor = xlThemeColorDark1
                .TintAndShade = -0.499984740745262
                .PatternTintAndShade = 0
            End With
            Rows("5:8").Select
            With Selection.Font
                .ThemeColor = xlThemeColorDark1
                .TintAndShade = -0.349986266670736
            End With
        Else
            Rows("5:8").Select
            With Selection.Interior
                .Pattern = xlNone
                .TintAndShade = 0
                .PatternTintAndShade = 0
            End With
            With Selection.Font
                .ColorIndex = xlAutomatic
                .TintAndShade = 0
            End With
        End If
        
        Range("B10").Select
    End Sub
    Attached Files Attached Files
    1. Click on the * Add Reputation if you think this helped you
    2. Mark your thread as SOLVED when question is resolved

    Modytrane

+ 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. [SOLVED] Hide/unhide based on ComboBox value and CheckBox value
    By Rzzberry in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 07-31-2017, 11:54 AM
  2. Need help to hide a checkbox based on another cells value
    By Dj Duck in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-26-2016, 08:58 PM
  3. [SOLVED] Hide Columns based on checkbox
    By ALecsx in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-30-2015, 10:58 AM
  4. Hide/unhide 2 columns based on checkbox
    By horsefish01 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-12-2015, 03:27 AM
  5. Hide and Unhide worksheets based on checkbox Tick
    By TwistedFaith in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 06-14-2015, 01:23 PM
  6. Hide rows based on userform checkbox
    By rodrignj in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 01-21-2015, 05:38 AM
  7. [SOLVED] Visually hide cell value but keep it for calculations?
    By pstein in forum Excel General
    Replies: 7
    Last Post: 09-03-2014, 02:52 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