Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Copy worksheet with named ranges to new workbook and keep names in | Excel Programming | |||
Copy worksheet with named ranges to new workbook and keep names | Excel Worksheet Functions | |||
How do I force all functions within a cell or worksheet to bere-evaluated without doing it manually? | Excel Programming | |||
Refer to Worksheet Ranges in Code | Excel Programming | |||
copy range on every worksheet (diff names) to a master worksheet (to be created) | Excel Programming |