LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #12   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,624
Default VBA Precedence Problem

In article om,
"keepITcool" wrote:

seeing the reactions of others I looked
into this with a bit more ca

Looks like most of this is due to using the TEXT property.


That's interesting - good catch.

But it's also interesting that in the original scenario, after
demonstrating the anomaly, modifying the function to

Function MyTest(r As String) As String
myTest = r
End Function

causes it to work correctly, and then, going back to the original .Text
formula:

Function MyTest(r As Range) As String
myTest = r.Text
End Function

works correctly too...

So it may be partly due to the Text property, but it also appears to be
due to the order in which the calculation dependency table is created.

it looks like the updating sequence as follows
the values in the worksheet are updated.
the text in all cells are updated using
numberformats and other formatting.


in that case, restoring the .Text property in the macro above should
cause the lagging behavior to return, but it doesn't. I also find it
hard to believe that the Text property is not updated at the same time
as the Value property.

since a change in TEXT does not trigger
a calculation event c1 is not aware it needs another recalc.


Don't think so - if the dependency tree is properly structured, C1
should never be marked "clean" until B1 is calculated and its value and
text properties updated.

That said, I don't have a clue what's going on internally...
 
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
HOW DO I SET UP A PRECEDENCE DIAGRAM? G Heard Excel Worksheet Functions 1 May 30th 07 05:49 AM
Module Precedence? sb Excel Discussion (Misc queries) 3 December 6th 06 12:14 AM
MAJOR BUG: Excel operator precedence is wrong P Keenan Excel Worksheet Functions 5 June 23rd 06 02:18 PM
Need explanation on operator precedence SFH Excel Discussion (Misc queries) 5 March 22nd 06 04:16 AM
With formulas does anyone know the order of precedence BOMDAS Samantha Excel Worksheet Functions 9 November 14th 05 08:48 AM


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