LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
PBJ PBJ is offline
external usenet poster
 
Posts: 19
Default Simple Macro Works on PC But Not Mac--Help!

The following macro loops through rows 5 to 500, and if the cell in Column AG
is dark gray (ie, has a Color Index of 16), hides that row:

Sub HideRows()
BeginRow = 5
EndRow = 500
ChkCol = 33
For RowCnt = BeginRow To EndRow
If Cells(RowCnt, ChkCol).Interior.ColorIndex = 16 Then
Cells(RowCnt, ChkCol).EntireRow.Hidden = True
End If
Next RowCnt
End Sub

This routine works fine on my PC at home (XL 2003), but on my Mac at work
(XL for MAC 2004) it poops out after hiding just the first gray row it comes
to. Why will this loop through the whole range on my PC but not my Mac?
Doesn't anyone have an alternative?

Please help. This is driving me insane. 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
Macro do works in excel... driller Excel Worksheet Functions 7 July 12th 07 02:56 PM
Macro works for some users and not others kfell Excel Discussion (Misc queries) 6 April 17th 07 02:41 PM
Email Macro only sometime works? PaulW Excel Discussion (Misc queries) 0 August 15th 06 10:22 AM
Macro works but buttons don't markvi Excel Discussion (Misc queries) 0 June 8th 06 09:19 PM
macro works for some users and doesn't for others Pooja Excel Discussion (Misc queries) 2 October 27th 05 08:27 PM


All times are GMT +1. The time now is 07:11 AM.

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

About Us

"It's about Microsoft Excel"