LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
Ed Ed is offline
external usenet poster
 
Posts: 399
Default Help finding error setting range to Visible Cells

My code loops through a series of named ranges. If there is an "X" in Col A
of any row of the range, that row is hidden. A new range is then set to the
visible cells, and then the rows are unhidden. My ranges are named "rng1",
"rng2", "rng3", "rng4", and "rngC". With XL2000, I'm using
Set rngVis = Range(strName).SpecialCells(xlCellTypeVisible)
where strName is the range name.

This works fine except in two instances, one expected, and one confusing.
If a range has all rows "X"ed out, meaning all rows get hidden, trying to
set a new range to Visible Cells gives an error 1004 - "Can't find any
cells". With Tom's help, I'm working on that.

But I also get error 1004 - "Can't find any cells" on rngC, whether any rows
are hidden or not. I can select rngC, both by code using strName and by the
Name box on the worksheet, and it is about five rows by 20 columns. But I
can't select the Visible Cells without an error.

Where can I begin looking for the reason for this?

Ed


 
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
How do I include only visible cells in a range? Frequent User Excel Worksheet Functions 1 November 28th 05 04:31 PM
Select only visible cells in a selected range DataFreakFromUtah Excel Programming 1 May 13th 04 03:26 AM
Trying to select the visible range of cells Selector Excel Programming 1 February 1st 04 08:40 PM
Error stepping through Autofiltered visible range Ed[_9_] Excel Programming 2 January 15th 04 05:34 PM
error with setting "Items.Visible = True" Stan R Excel Programming 1 August 20th 03 09:51 AM


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