LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
Ake Ake is offline
external usenet poster
 
Posts: 18
Default Is this a bug?

Hi there,

I came across an inconsistency while coding the other day. I could easily
avoid it, so this is not the issue today. But, yet, I am curious by nature.
Is there some natural explanation, or have I come across a bug?

In its simplest form it works like this.
1. In a sheet (not in a macro) I name a cell to, say, NamedCell (say =$A$38).
2. I start a macro (singlestepping) and eventually I do
[NamedCell]="Contents", and sure enough, the contents appear in the cell
"A38".
3. As a check I do test=[NamedCell] and the contents are returned as expected
4. From within the first macro I immediately thereafter execute a second macro
5. In the second macro I immediately do test=[NamedCell], but both variables
are then declared empty. How come?

If this was a reference to a local variable, it is only proper that the
second macro does not know about it. But this is a reference to a named cell
in a sheet in a common work book- so all macros in that work book should have
access to it, I trust. (No other code is involved - not even declarations ;-)

Regards / Ake
 
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



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