PDA

View Full Version : run time error 438, but method DOES exist!!!!



neeeel
06-11-2011, 07:15 AM
Ok I am really confused about this one. I have a class with some methods, that get called from a class variable on another sheet.the class is called Race, and there are various methods, eg addBet, and processRace. If I instatiate a variable called currentRace, do nothing else to it, and call currentRace.processRace, the code works fine. If I instatiate the variable, call addBet, and then call currentRace.processRace I get a run time error 438 , object does not support that property or method!! But the method does exist, as can be seen when it gets successfully called as described above.
It works fine on my PC, but on someone elses pc I get this problem.

I am at a loss as to whats going on, any ideas?
thanks

Bob Phillips
06-11-2011, 09:15 AM
Impossible to make any suggestions without the code, preferably the workbook.

neeeel
06-11-2011, 09:59 AM
Fixed, it wasnt the method that it was highlighting that was the problem, it was code inside the method, must be some setting of excel that highlights the calling method

Frosty
06-11-2011, 10:22 AM
Sounds like a good time to set up error trapping.

Bob Phillips
06-11-2011, 10:39 PM
Fixed, it wasnt the method that it was highlighting that was the problem, it was code inside the method, must be some setting of excel that highlights the calling method

Look at Tools>Options>General>Error Trapping in the VBIDE.