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: 126
Default strange VBA behavior with named ranges

Try the following, and see if you think this is strange.

start with an empty workbook with three worksheets.
create a book level defined name "aaa" on Sheet1
create a sheet level defined name "aaa" on Sheet2
Make Sheet1 the activesheet.
In the VBA immediate window do msgbox
range("aaa").address(external:=true)
you should get the range on Sheet1
make Sheet2 the activesheet.
In the VBA immediate window do msgbox
range("aaa").address(external:=true)
you should get the range on Sheet2
make Sheet3 the Activesheet.
In the VBA immediate window do msgbox
range("aaa").address(external:=true)
you should get the range on Sheet1

So far, so good.

Now make a chart and put it on a separate chartsheet.
make the chartsheet the activesheet.
In the VBA immediate window do msgbox
range("aaa").address(external:=true)
I get the range on Sheet2

I think with the chartsheet active, the book level name should be
returned as when Sheet3 was active.

I wonder if this is a bug in VBA?
 
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 01:37 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"