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: 3
Default Hide Row macro works in 2002 but not 2003

Good Day, I have been from site to site to get an answer and I am stumped...
I am usiing the following code:

Private Sub Worksheet_Calculate()
Dim x As Integer
Application.ScreenUpdating = False
Cells.EntireRow.Hidden = False 'unhide everything
For x = 51 To 79
If Range("U" & x).Value = 0 Then
Rows(x).EntireRow.Hidden = True
End If
Next x
Application.ScreenUpdating = True
End Sub

The purpose and background is that the workbook has 9 sheets. This code is
being utilized on 2 of the sheets. The macro was created in Excel 2002 and
when i try the file in Excel 2003 I get screen flickers and the file crashes.
When i hit CTRL + Pause the program skips to the debugger and hilights either
End If or End Sub, i guess somewhere in the loop it has caused?

In the range "U51:U79" there is a formula (HLOOKUP - for sheete 5 & 7 ) that
will display a result of either a 1 or a 0 depending on what item is chosen
on sheet 1. If it is a 0 then i would like the macro to hide the rows that
are 0. Another note is that this macro works with the sheets all password
protected and i allow rows to be formated when I set the password. (i have
tried unprotecting the sheet in Excel 2003, still does not work)

Again the Worksheet works perfectly in Excel 2002 but crashes in Excel 2003.

Sorry for the long winded note but i was reading several other posts and
wanted to try to give as much info so we are not reposting Q&A about the
spreadsheet functions.

I hope I left enough info.
Thanks

 
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
Code signing a VBA macro in 2002 and 2003 Stephen Davies Excel Programming 5 April 6th 05 02:03 AM
Excel 2003 Issue with UsedRange.Copy (code works in Excel 2002) TechFirm Excel Programming 4 January 21st 05 01:53 AM
code works in excel 2002, but not in excel 2003 pyc Excel Programming 2 September 2nd 04 01:16 PM
Excel 2002/2003 Macro Compatibility issue Steve[_64_] Excel Programming 0 July 23rd 04 03:05 AM
Macro works in 2003, not in '97 CLR[_2_] Excel Programming 5 July 15th 04 01:29 PM


All times are GMT +1. The time now is 03:51 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"