Cyberdude
07-05-2006, 10:32 AM
This is not a new problem ? in fact I can?t remember when it didn?t occur in Excel 2003.
It occurs when I?m stepping through code in a VBA macro by pressing the F8 key repeatedly. It executes as expected line by line until I reach a certain point, then it switches to a function I have in Personal.xls and continues line by line through that function?s code. At the end of the function, then it goes into a loop by starting execution of the function again line by line. Note that a reference to that function is NEVER made within the macro being tested. Curiously, this is a repeatable error that always occurs in the same location in the macro being tested.
In the current macro that I?ve been testing, the statement that triggers the branch to the function is:
Case Small3: Range("AQ68") = .Offset(0, -5)
Other nearly identical ?Case? statements execute as expected without the branch. Nothing in this statement is similar to locations in other macros that I had problems with. The problem does not occur in all macros, and it occurs in other unrelated workbooks. Note that I can run the macro successfully by pressing the F5 key. This has been true of other macros that had the problem. Also, when the branch occurs, it ALWAYS goes to the same function in Personal.xls.
Has anyone else had a similar problem? (Weird ? very weird) :bug:
It occurs when I?m stepping through code in a VBA macro by pressing the F8 key repeatedly. It executes as expected line by line until I reach a certain point, then it switches to a function I have in Personal.xls and continues line by line through that function?s code. At the end of the function, then it goes into a loop by starting execution of the function again line by line. Note that a reference to that function is NEVER made within the macro being tested. Curiously, this is a repeatable error that always occurs in the same location in the macro being tested.
In the current macro that I?ve been testing, the statement that triggers the branch to the function is:
Case Small3: Range("AQ68") = .Offset(0, -5)
Other nearly identical ?Case? statements execute as expected without the branch. Nothing in this statement is similar to locations in other macros that I had problems with. The problem does not occur in all macros, and it occurs in other unrelated workbooks. Note that I can run the macro successfully by pressing the F5 key. This has been true of other macros that had the problem. Also, when the branch occurs, it ALWAYS goes to the same function in Personal.xls.
Has anyone else had a similar problem? (Weird ? very weird) :bug: