S
Steven M (remove wax and invalid to reply)
I have a continuing perplexing problem. Using Excel 2000, I created a
test routine, in a module in Personal.xls:
Sub TestAssign()
ActiveSheet.Cells(17, 10).Value = "TT"
End Sub
When I run it in my currently open spreadsheet, it changes the value
of cell J17 to "TT" and the subroutine finishes normally. That's as
expected.
I have another routine, a function defined in a module in the
spreadsheet. It includes the same statement:
ActiveSheet.Cells(17, 10).Value = "UU"
There is a breakpoint on this line. Before execution, the arguments
have the values 17 and 10, same as above. When I press F8 to execute
that step, execution does NOT continue to the same line. Nothing
changes in the active sheet (there is only one sheet in the file.)
There's no error, it just stops.
The only thing that seems to be different is that the assignment to
..Value works if the function is stored in a module in Personal.xls,
and does NOT work if the function is in a module in the current
spreadsheet.
Is this some sort of bug in VB?
test routine, in a module in Personal.xls:
Sub TestAssign()
ActiveSheet.Cells(17, 10).Value = "TT"
End Sub
When I run it in my currently open spreadsheet, it changes the value
of cell J17 to "TT" and the subroutine finishes normally. That's as
expected.
I have another routine, a function defined in a module in the
spreadsheet. It includes the same statement:
ActiveSheet.Cells(17, 10).Value = "UU"
There is a breakpoint on this line. Before execution, the arguments
have the values 17 and 10, same as above. When I press F8 to execute
that step, execution does NOT continue to the same line. Nothing
changes in the active sheet (there is only one sheet in the file.)
There's no error, it just stops.
The only thing that seems to be different is that the assignment to
..Value works if the function is stored in a module in Personal.xls,
and does NOT work if the function is in a module in the current
spreadsheet.
Is this some sort of bug in VB?