LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Auto-Hiding rows based on cell in seperate worksheet

Hello all,

First Special thanks to Dave Peterson for his off-forum help.

The following code does what I want, hiding/unhiding a row based o
whether a cell on another worksheet is blank/non-blank, respectively:

Option Explicit
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count 1 Then Exit Sub
If Intersect(Target, Me.Range("c5")) Is Nothing Then Exit Sub

On Error GoTo errHandler:
With Target
Application.EnableEvents = False
Worksheets("Trade Output").Range("A6").EntireRow.Hidden
CBool(.Value = "")
End With

errHandler:
Application.EnableEvents = True

End Sub

This code, as you can see, hides/unhides ROW 6 based on c5. I want t
likewise mode ROWS 7 and 8 based on d5 and e5, respctively.

I am still too green in VBA to confidently tweak properly. Any help i
modifying the above code would be great appreciated.

Thanks all,

James

--
Message posted from http://www.ExcelForum.com

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Hiding/Exposing Rows based on a cell value Tami Excel Worksheet Functions 10 July 11th 09 02:03 PM
Hiding rows based on a cell? OX_Gambit Excel Worksheet Functions 3 July 10th 09 03:05 AM
hiding or showing rows based on a cell value jordanpcpre Excel Discussion (Misc queries) 6 April 24th 08 04:14 PM
Hiding rows based value of cell within row Legion_c18 Excel Discussion (Misc queries) 0 February 22nd 08 06:01 AM
Hiding rows based on cell content alistair01[_4_] Excel Programming 2 February 3rd 04 01:58 PM


All times are GMT +1. The time now is 01:51 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"