Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Trying to select the visible range of cells

I am trying to select a visible range of cells within a certain selection, but I'm getting a lot of errors.
Also, I need to allow for when the selection already contains visible cells only. My failing code is:

Range(strTitleRange).VisibleRange.Select

Could you please supply your example code to fix these issues?

TIA
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Trying to select the visible range of cells

VisibleRange pertains to what can be seen on the screen and is a property of
the window object, not the range object.

Dim rng as Range
set rng = Intersect(Range(strTitleRange),Activewindow.Visibl eRange)
if not rng is nothing then
rng.Select
End if

--
Regards,
Tom Ogilvy

Selector wrote in message
...
I am trying to select a visible range of cells within a certain selection,

but I'm getting a lot of errors.
Also, I need to allow for when the selection already contains visible

cells only. My failing code is:

Range(strTitleRange).VisibleRange.Select

Could you please supply your example code to fix these issues?

TIA



Reply
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 can you select visible cells only by default, without Ctrl+G. Lucian Cornea Excel Discussion (Misc queries) 3 April 23rd 08 05:07 PM
select only used rows and only visible cells Rokuro kubi Excel Discussion (Misc queries) 2 September 28th 06 02:06 PM
how do I select, cut, and paste visible cells only Cutting and pasting invisible cells. Excel Discussion (Misc queries) 2 May 10th 06 09:55 PM
Select Visible Cells Only Apparently Excel Discussion (Misc queries) 2 January 29th 05 12:40 AM
select visible cells when printing Richard Leclezio Excel Programming 0 October 1st 03 10:22 AM


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