Results 1 to 5 of 5

Automatically Hiding Rows from True or False Value

Threaded View

  1. #1
    Registered User
    Join Date
    02-05-2007
    Posts
    12

    Automatically Hiding Rows from True or False Value

    I'm creating a two sheet workbook where the first sheet will have questions and checkboxes for answers to the questions being asked. If the checkbox is selected we get a True response, if not false, the resultant is placed in row a. I copy the results from sheet A to sheet B. I'm trying to work on some VB code on sheet B to automatically hide rows if a value in a cell is False. If true it is to stay visible. My code isn't working though. Can anyone help?


    Private Sub Worksheet_Calculate()
    Dim LastRow As Long, c As Range
    Application.EnableEvents = False
    LastRow = Cells(Cells.Rows.Count, "A").End(xlUp).Row
    On Error Resume Next
    For Each c In Range("A1:A" & LastRow)
    If c.Value = False Then
    c.EntireRow.Hidden = True
    ElseIf c.Value = True Then
    c.EntireRow.Hidden = False
    End If
    Next
    On Error GoTo 0
    Application.EnableEvents = True
    End Sub
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Rows to hide/unhide when checkbox = true/false
    By PDBartlett in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 05-06-2014, 10:40 AM
  2. What is best to use for helper cells 0 or 1, typed true or false or =true =false
    By Gingermuppet in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-20-2014, 10:41 PM
  3. [SOLVED] in this TRUE OR FALSE function, i want desired name instead of display true or false
    By vengatvj in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-15-2013, 06:44 PM
  4. [SOLVED] Automatically Drag True/False Statement
    By alcharbonneau in forum Excel General
    Replies: 2
    Last Post: 08-23-2012, 09:27 AM
  5. Deleting rows based on True/False Criteria
    By CatherineN in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-15-2007, 02:40 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