Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default How to get evaluated value of worksheet names that do not refer to worksheet ranges?

I have workbook named "ranges" that refer to things that aren't ranges of
cells.

E.g., MinWidthToSet refers to "=8" and RowsToTest refers to
"=COUNTA(MyRange)" (and these are simplified examples for discussion).

The problem comes in when trying to get a value for these from VBA since
they can't be found as default values of Range("MinWidthToSet") or
Range("RowsToTest").

I tried using Names("MinWidthToSet") which returns the string "=8"--I can
strip the "=" and CLng the remainder. Ugly but functional.

Bet there's no good way to do anything with the string "=COUNTA(MyRange)".

I've also tried Application.Evaluate "=RowsToTest" but this gets into all
kinds of ugly issues of the context in which the evaluation is done since
these are all scoped to specific sheets and multiple workbooks may be open
when this needs to be evaluated.

Is there a workaround to get the evaluated value of these names that aren't
cell ranges?

How does one define the complete context for an Application.Evaluate when
running code that belongs to a specific worksheet?

Thanks in advance!

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default How to get evaluated value of worksheet names that do not refer to worksheet ranges?

Brain Damage.

Me.Evaluate ("NamedWhatever")

"Dick Watson" wrote in
message ...
I've also tried Application.Evaluate "=RowsToTest" but this gets into all
kinds of ugly issues of the context in which the evaluation is done since
these are all scoped to specific sheets and multiple workbooks may be open
when this needs to be evaluated.

Is there a workaround to get the evaluated value of these names that
aren't cell ranges?


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
Copy worksheet with named ranges to new workbook and keep names in Sandy Excel Programming 1 July 11th 08 07:23 PM
Copy worksheet with named ranges to new workbook and keep names Sandy Excel Worksheet Functions 0 July 11th 08 04:37 PM
How do I force all functions within a cell or worksheet to bere-evaluated without doing it manually? mike Excel Programming 0 March 26th 08 03:11 PM
Refer to Worksheet Ranges in Code Andibevan[_2_] Excel Programming 8 March 30th 05 12:20 PM
copy range on every worksheet (diff names) to a master worksheet (to be created) Bernie[_3_] Excel Programming 0 September 22nd 04 03:26 PM


All times are GMT +1. The time now is 11:15 PM.

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"