Consulting

Results 1 to 5 of 5

Thread: run time error 438, but method DOES exist!!!!

  1. #1
    VBAX Regular
    Joined
    Oct 2010
    Posts
    23
    Location

    run time error 438, but method DOES exist!!!!

    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

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Impossible to make any suggestions without the code, preferably the workbook.
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  3. #3
    VBAX Regular
    Joined
    Oct 2010
    Posts
    23
    Location
    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

  4. #4
    VBAX Master
    Joined
    Feb 2011
    Posts
    1,480
    Location
    Sounds like a good time to set up error trapping.

  5. #5
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Quote Originally Posted by neeeel
    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.
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •