Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBA Precedence Problem
The following steps will show you how to reproduce the problem that I'm
having. In the following test case, I would expect the following to occur. When I update the contents of cell A1, Excel should update the cells that depend on it, so cell B1 should be updated then C1 because C1 depends on B1. This is not what happens. C1 gets updated before B1. Can anyone explain this or offer a workaround? Create New Workbook Set B1 to equal "=A1" Set C1 to equal "=MyTest(B1)" Insert VBA Module into Workbook Create a function (see below) Public Function MyTest(r As Range) As String MyTest = r.Text End Function A1 should be empty B1 should be 0 C1 should say #NAME? Type a into A1 B1 should say "a" *** C1 should say "a" but it doesn't it say "0" P.S. I'm using Windows XP SP2 with Office XP SP3 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
HOW DO I SET UP A PRECEDENCE DIAGRAM? | Excel Worksheet Functions | |||
Module Precedence? | Excel Discussion (Misc queries) | |||
MAJOR BUG: Excel operator precedence is wrong | Excel Worksheet Functions | |||
Need explanation on operator precedence | Excel Discussion (Misc queries) | |||
With formulas does anyone know the order of precedence BOMDAS | Excel Worksheet Functions |