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 Help with hiding rows by VBA


HI everyone,

I have a bit of code that I have been trying to get to work but haven'
had any luck.

Private Sub Worksheet_Calculate()
'Sheet module code, like: Sheet3!
Dim myRng As Range

Set myRng = Range("L9", Range("L208"))

Application.ScreenUpdating = False
For Each c In myRng
If c.Value = "" Then c.EntireRow.Hidden = True

If c.Value < "" Then c.EntireRow.Hidden = False
Next c

Application.ScreenUpdating = True
End Sub


Cells L9 - L208 all have formula in them that are tied to other cell
that have formulas in them

when I run the above code any change that I make to the workbook no
just the worksheet that the code is in weather or not it effects cell
L9 - L208 causes lines to be hidden or unhidden and my screen to star
blinking. I have to hit the escape key and end or debug to regai
control of excel.

Any ideas where I went wrong would be appreciated, I pretty new to VB
so I'm sorry that I don't know how to explain my self better.

Thanks for your tim

--
mav9
-----------------------------------------------------------------------
mav93's Profile: http://www.excelforum.com/member.php...fo&userid=3159
View this thread: http://www.excelforum.com/showthread.php?threadid=51286

 
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
Color alternate rows when after hiding selected rows Monk[_2_] Excel Worksheet Functions 6 June 7th 08 01:36 AM
Hiding Specific Rows Based on Values in Other Rows Chris Excel Worksheet Functions 1 November 2nd 06 08:21 PM
Hiding a button when hiding rows fergusor Excel Discussion (Misc queries) 2 August 10th 06 02:31 PM
Hiding Rows if the linked rows are blank KG Excel Discussion (Misc queries) 9 May 18th 05 02:32 AM
Copying Rows when hiding other rows Neutron1871 Excel Worksheet Functions 2 November 3rd 04 11:38 PM


All times are GMT +1. The time now is 08:17 AM.

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"