LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default Problem getting the value of a Named Range in code

I'm not very experienced with Excel VBA yet, so I often use the
immediate window to try out various syntax before coding it up.

I found something that works in the immediate window when nothing is
running:

? Range("OnSiteRate").value

does NOT work when the code is run or in the immediate window with the
code paused due to the error. I found a workaround:

? ThisWorkbook.Names("OnSiteRate").RefersToRange

but I'm curious as to why this doesn't work in both circumstances.

Thanks
tbone
 
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
VBA code to affect value of a named range Dave O Excel Discussion (Misc queries) 5 August 25th 06 10:12 PM
Named ranges vs setting range in code Tim Excel Programming 2 February 24th 06 02:50 AM
named range problem Rbp9ad[_2_] Excel Programming 4 December 1st 05 10:21 PM
How to conditional color a named range in VBA code mark engineer Excel Programming 1 October 31st 05 03:12 AM
Named Range Fails in VBA Code Dean Hinson[_3_] Excel Programming 3 January 24th 05 03:48 PM


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