Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,119
Default Call Statement and Return Value

selects are a bit of a beast to deal with. I avoid them like the plague. You
can not select a range that is not on the active sheet... for example

dim rngThis as Range
dim rngThat as Range

set rngThis = sheets("This").Range("A1")
set rngThat = sheets("That").Range("A1")

Sheets("This").select
rngThis.select 'This is good
rngThat.select 'This will generate a run time error...

--
HTH...

Jim Thomlinson


" wrote:

Thanks,

Thanks seems to set rng to the return value of my function but when I
try to use the rng range to do something like :

rng.select

It's not working. So I don't know if it's really sets as a range.


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
using a IF statement to return a value Cindy M Excel Worksheet Functions 3 March 26th 10 08:51 PM
using an if then statement call a caption box to a cell ratt[_3_] Excel Programming 2 June 20th 05 05:24 AM
using an if then statement call a caption box to a cell ratt[_2_] Excel Programming 1 June 16th 05 05:30 AM
using an if then statement call a caption box to a cell mangesh_yadav[_325_] Excel Programming 0 June 16th 05 05:02 AM
Can you call a macro as in an IF statement kls[_2_] Excel Programming 2 September 11th 04 10:48 PM


All times are GMT +1. The time now is 12:49 PM.

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"