Does anyone have any ideas about the following error
Runtime error '451':
Property let procedure not defined and property get procedure did not return an object.
I get this in message in a popup when I call a function on a custom class. The function is supposed to return a boolean value if the code it contains executed successfully. It is used in a manner similar to the following:
'In an ordinary module
Dim myClassInstance as myClass
Dim success as boolean
set myClassInstance = new myClass
success = myClassInstance.SomeFunction 'NOTE: Here is where the debugger takes me
'In the class module
'Class declaration
Public Function SomeFunction()
functionOK = False
if (test = True) then
functionOK = True
end if
SomeFunction = functionOK
End Function
Thanks for any suggestions,
J

mysterious error: RUNTIME ERROR '451'
Armand du Plessis
Here's a little more background on the project:
I've created a userform attached to an Excel file. The userform accepts some input, then does some processing with an AS400 minicomp. Most of the code for the project is in some custom classes, eg. a DataHandler class for database interaction, a ConnectionHandler class for connection handling, etc.
The odd thing is that I get the same error if I take the function out of its object and just execute it from an ordinary module.
Maybe my userform has gotten corrupted... That sort of thing has happened to me before. Although I don't see why that would affect code that is not attached directly to the form.
Anyway, thanks again.
J
jcMud
hello J,
As you've worked out your function isn't the reason for the error.
Have a read of these and see if you they help, it's a fairly easy problem to fix if you can find the code that caused the error.
http://uk.wrs.yahoo.com/_ylt=A9ibyjdcs2VE8woB4RlLBQx.;_ylu=X3oDMTE5OHBhZWR1BGNvbG8DZQRsA1dTMQRwb3MDMQRzZWMDc3IEdnRpZANVSzAyMjBfMjIw/SIG=137cii7jp/EXP=1147602140/**http%3a//msdn.microsoft.com/library/en-us/vbenlr98/html/vamsgNotEnum.asp%3fframe=true
http://www.attention-to-details.com/newslog/37k-vba-error-property-let-procedure-not.asp#a209