I (unfortunately) am developing an application in Excel 2000 VBA. I believe that I found that any error that occurs in the properties, functions, or auxiliary debugs of a custom class is as if the error had been raised at the point in the VBA code where the property is being called. That is, the VBE debugger does not bring me to the point in the Class property where the error occurred, but instead where the property was first entered (for example, from a module or module function), this makes it difficult to develop anything larger than the smallest code OO Excel 2000 VBA, since I must step by step execute each method of the class to detect the instructions that cause the error.
Am I missing something or is this a known bug that I have to deal with in Excel 2000? Was it fixed in 2003 or 2007?
Code example:
'''''''''''''''
'In Module1:
Public Sub TestSub1()
Dim testClass As Class1
Dim testVariant As Variant
Set testClass = New Class1
testVariant = testClass.Property1 'Debugger takes me here...
End Sub
''''''''''''''
' In Class1
Property Get Property1() As Variant
Err.Raise 666, , "Excel 2000 VBA Sux!" 'But error is actually thrown here.
End Property
source
share