Results 1 to 4 of 4
  1. #1
    4 Star Lounger
    Join Date
    Jan 2001
    Location
    Kortrijk, Belgium
    Posts
    571
    Thanks
    0
    Thanked 0 Times in 0 Posts

    message boxes are ignored (Excel 97/Win XP)

    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

  2. #2
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Weert, Limburg, Netherlands
    Posts
    4,812
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: message boxes are ignored (Excel 97/Win XP)

    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?
    Jan Karel Pieterse
    Microsoft Excel MVP, WMVP
    www.jkp-ads.com
    Professional Office Developers Association

  3. #3
    3 Star Lounger Jim Cone's Avatar
    Join Date
    Feb 2002
    Location
    Portland, Oregon, USA
    Posts
    238
    Thanks
    0
    Thanked 3 Times in 3 Posts

    Re: message boxes are ignored (Excel 97/Win XP)

    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

  4. #4
    4 Star Lounger
    Join Date
    Jan 2001
    Location
    Kortrijk, Belgium
    Posts
    571
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: message boxes are ignored (Excel 97/Win XP)

    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

Posting Permissions

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