• message boxes are ignored (Excel 97/Win XP)

    Home » Forums » AskWoody support » Productivity software by function » MS Excel and spreadsheet help » message boxes are ignored (Excel 97/Win XP)

    Author
    Topic
    #384088

    I have a VBA program running in Excel. The program guides the user through different steps with the aid of message boxes. He/she has to answer Yes/No to get to a certain final destination and at the end a result is written to a database. After about 25 records or results, the program don’t give any message boxes anymore and just puts a final result in the database. There seems to me no logic in this. When I exit Excel and return to the macro, everything is normal again. I now got this strange behaviour on two different computers. I really can’t imagine what the cause could be. I also don’t understand why these messageboxes just disappear. I don’t get an error message and I even went through the program using the de######. The message boxes don’t appear until I quit Excel and start all over again. Any ideas?

    Hans

    Viewing 1 reply thread
    Author
    Replies
    • #657746

      This is a new one to me.

      What I usually do when a program starts to disbehave is to clean the code. Download Rob Bovey’s code cleaner from the Excel MVP page listed below my signature.

      What happens when you step through the code?

    • #657749

      Hans,

      The only thing I can think of would be if you are you using the same variable to collect all the answers.
      Such as…

      Response = Response & vbcr & Response

      At about 20 to 24 lines, Msgboxes run out of room.
      However, I have never seen them refuse to appear.

      Regards,

      Jim Cone
      San Francisco, CA
      jim.coneXXX@rcn.comXXX

      • #657750

        Jim and Jan Karel,

        I am indeed using the same variable. I really don’t understand that the message boxes don’t show up anymore. The strange thing is that I don’t get error messages if I turn off error trapping. I guess it is a memory problem. If you can’t reproduce the problem, then it’s difficult to solve it. I’ve got it on two computers, but not on others. I’ll do what you suggested: clean up the code and change my variable name.

        Thanks

    Viewing 1 reply thread
    Reply To: message boxes are ignored (Excel 97/Win XP)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: