Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 126
Default strange VBA behavior with named ranges

I did not know about the sort order of defined names. So I definitely
have learned something new.

When you explain it as a "visibility" issue in relation to the sort
order, it all now makes sense.

I came across this in a VBA routine which uses Application.Evaluate to
compute some values using named ranges. The easy fix was to put the
sheet name in front of the defined name. For example:

x = Application.Evaluate("MAX(somenamedrange)")

now says

x = Application.Evaluate("MAX('sheet name'!somenamedrange)")

This gives me the result I want even if a chart sheet is the active
sheet.

Cheers,

Brian
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
Strange Named Ranges Barb Reinhardt Excel Discussion (Misc queries) 2 May 11th 09 06:33 PM
Named ranges scope / workbook/worksheet level named ranges- changeswith variable use... christian_spaceman Excel Programming 3 December 24th 07 01:15 PM
Need Help: Strange, Strange Behavior ( Not Me. My Model! ) SteveM Excel Programming 2 December 16th 07 06:02 PM
Strange behavior Patrick Simonds Excel Programming 2 November 25th 06 06:26 PM
Strange behavior. Wiley Coyote Excel Discussion (Misc queries) 7 October 18th 05 04:35 PM


All times are GMT +1. The time now is 06:50 AM.

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"