Results 1 to 2 of 2

VBA Help | Hiding Rows based on Strings

Threaded View

  1. #1
    Registered User
    Join Date
    07-09-2012
    Location
    Indiana
    MS-Off Ver
    Excel 2010
    Posts
    8

    VBA Help | Hiding Rows based on Strings

    Hello all,

    I am currently having issues with running a VBA sub in which I desire it to have the capability of hiding rows based off strings... my spreadsheet has tasks based off frequencies "weekly", "biweekly", "monthly" .... etc. all the way up to the second to last row which reads "additional notes".. I have command buttons for the different frequencies. I desire to be able to click "weekly" which would then hide all the tasks up until the row "additional notes." The code runs but nothing happens.. Any tips?

    Sub weekly()
    Dim LoopCell As Range
    Dim CellRange As Range
    Dim CellValue As String
    
    
    Set CellRange = Range("A1:A100")
    For Each LoopCell In CellRange
    If CellValue = "BIWEEKLY" Then
    Do
    LoopCell.Value = CellValue
    EntireRow.Hidden = True
    Loop Until CellValue = "ADDITIONAL NOTES"
    End If
    Next LoopCell
    
    End sub
    Any help is appreciated.
    mg
    Last edited by Cutter; 08-05-2012 at 03:03 PM. Reason: Added code tags

Thread Information

Users Browsing this Thread

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

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