Results 1 to 7 of 7

Thread: Weird Error

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Aug 2000
    Posts
    1,539
    this is the weirdest thing i came across

    here is the desription
    ======================

    when i complile my program and run it on this machine (it has vb on it)
    evrything works fine

    when i take my code and run it on another machine

    i get "invalid procedure or call" error
    on following

    Code:
    Load frmDispute
    frmDispute.Show
    Call frmDispute.NewDispute
    the error is on the call for precuder

    yes the procedure is public..

    now if i make it te following
    Code:
                
                Load frmDispute
                frmDispute.Show
                msgbox "this will prevent the error"
                Call frmDispute.NewDispute
    i wont get an error on that if i put a simple msgbox before the call of the procedure
    anyone ever came across this?

    thanks


  2. #2
    Fanatic Member
    Join Date
    Oct 2000
    Location
    London
    Posts
    1,008
    Yes, I have had that happen before. I had to recompile the entire project.

    Cheers,

    P.
    Not nearly so tired now...

    Haven't been around much so be gentle...

  3. #3

    Thread Starter
    Frenzied Member
    Join Date
    Aug 2000
    Posts
    1,539
    what do yo mean recompile the project
    i keep taking FRESH .exe to the other computer
    it works with a messagebox before it
    yet it crashes if there is no message box

    so how do i fix
    grr this i hate

  4. #4
    Frenzied Member Buzby's Avatar
    Join Date
    Jan 1999
    Location
    UK
    Posts
    1,670
    Try putting

    DoEvents

    where you have the Msgbox line; eg;

    Code:
    Load frmDispute
    frmDispute.Show
    DoEvents
    Call frmDispute.NewDispute
    that might help.



    'Buzby'
    Visual Basic Developer
    "I'm moving to Theory. Everything works there."

  5. #5

    Thread Starter
    Frenzied Member
    Join Date
    Aug 2000
    Posts
    1,539
    well without .show it worked to a certain point
    then i started having problems since some of my procedures assing other values to objects in that form.. so that didn't work

    BUT

    i used DoEvents
    as suggested by Buzby and everything seems to work fine now

    THANK YOU so much

    so the keytrick is doevents (for those that need it)

  6. #6
    Lively Member
    Join Date
    Aug 2000
    Location
    Bristol, UK
    Posts
    86

    Very annoying

    I've been getting the same error message. My application works on most machines but on a small number I get this error message.

    If anyone has any idea at all whats causing it, I'd be very grateful!

  7. #7

    Thread Starter
    Frenzied Member
    Join Date
    Aug 2000
    Posts
    1,539
    since doevents fixed the problem
    i am guessing the machine thats causing errors doesnt finish everything in the queue before it does that and causes the error

    but the doevent fixes it..


Posting Permissions

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



Click Here to Expand Forum to Full Width