PC Review


Reply
Thread Tools Rate Thread

Displaying the extent of a range variable

 
 
simonc
Guest
Posts: n/a
 
      9th Jan 2009
What is the easy way of displaying the range of cells which is assigned to a
range variable? This is for debugging purposes, and I just want a property of
the variable which I can display with debug.print which will show me which
cells are in the range.

Grateful for advice.
 
Reply With Quote
 
 
 
 
Gary''s Student
Guest
Posts: n/a
 
      9th Jan 2009
MsgBox (r.Parent.Name)
MsgBox (r.Address)

will display both the cells and the sheetname.
--
Gary''s Student - gsnu200825


"simonc" wrote:

> What is the easy way of displaying the range of cells which is assigned to a
> range variable? This is for debugging purposes, and I just want a property of
> the variable which I can display with debug.print which will show me which
> cells are in the range.
>
> Grateful for advice.

 
Reply With Quote
 
simonc
Guest
Posts: n/a
 
      9th Jan 2009
Gosh, thanks. I spent ages looking in the Locals list to find that. Who would
have thought it was so simple!
 
Reply With Quote
 
Gary''s Student
Guest
Posts: n/a
 
      9th Jan 2009
You are very welcome.

By the way, in addition to displaying the sheetname and cells, you can use:

r.Parent.Parent.Name

to get the filename as well.
--
Gary''s Student - gsnu200825


"simonc" wrote:

> Gosh, thanks. I spent ages looking in the Locals list to find that. Who would
> have thought it was so simple!

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Testing Range Extent =?Utf-8?B?TmlnZWwgUlM=?= Microsoft Excel Programming 2 17th May 2007 10:15 AM
Displaying the Highest Value in a user-variable range of cells =?Utf-8?B?VGFiYnk=?= Microsoft Excel Programming 1 26th Apr 2005 09:12 PM
setting a range variable equal to the value of a string variable Pilgrim Microsoft Excel Programming 2 1st Jul 2004 11:32 PM
Defining Range Extent Nigel Microsoft Excel Programming 2 5th Oct 2003 12:10 PM
Problem trying to us a range variable as an array variable TBA Microsoft Excel Programming 4 27th Sep 2003 02:56 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:24 AM.