Consulting

Results 1 to 13 of 13

Thread: Phantom MsgBox

  1. #1
    VBAX Regular
    Joined
    Mar 2009
    Posts
    14
    Location

    Phantom MsgBox

    I have developed several subforms to a form that have msgbox alerts for the user's convenience. I noticed that when I start up the application again on another day, a phantom msgbox pops up. It is one of my msgboxes from the vba behind a subform that is not active...or at least I don't think it is. Could you give me some suggestions on where to look for the "trigger" that causes these phantom msgbox?

  2. #2
    VBAX Guru Kenneth Hobs's Avatar
    Joined
    Nov 2005
    Location
    Tecumseh, OK
    Posts
    4,956
    Location
    Without the xls or code, there is not way for us to troubleshoot. MsgBox may have focus issues at times. A call to a userform with a textbox might be more reliable.

  3. #3
    VBAX Regular
    Joined
    Mar 2009
    Posts
    14
    Location
    Kenneth,
    Thanks for your response. I have an InitialForm that collects personal information like name, address, city state and zip. On that form there are checkboxes that call up subforms for seperate information like languages. A subform for Visual Basic, C/C++.C#, Java, Web Developement, PHP, Perl, etc. On each subform there are checkboxes showing experience. On one of the subforms there is a listbox where you enter the consulting groups you will work for. You can add or remove names at will. If you remove all, a msgbox appears alerting you that there are no names and the checkbox on the initial form will be unchecked.
    On load of a new application without any developer information, those alert msgboxes show up. How would I keep them from showing at start up?

  4. #4
    VBAX Mentor MaximS's Avatar
    Joined
    Sep 2008
    Location
    Stoke-On-Trent
    Posts
    360
    Location
    post the code otherwise is just guessing what's wrong.

  5. #5
    VBAX Guru Kenneth Hobs's Avatar
    Joined
    Nov 2005
    Location
    Tecumseh, OK
    Posts
    4,956
    Location
    Not sure why they would show when you Open the file.

    You can use this but be sure to set it to True at some point.
    [VBA]Application.EnableEvents = False[/VBA]

    Of course without knowing what you are doing to trigger the problem, I can only guess.

  6. #6
    VBAX Regular
    Joined
    Mar 2009
    Posts
    14
    Location

    Thanks Ken

    Kenneth,
    Thanks so much for looking at this issue. I am still faced with it, but have found a work around. It is not a solution, but the code is much larger than what I can post in a vba window. If I was sure where the phantom message boxes were triggered from I would include that code, but I am stumped on where they come from.
    My thanks for being brave enough to help the novice!
    -Jack-

  7. #7
    Administrator
    VP-Knowledge Base
    VBAX Grand Master mdmackillop's Avatar
    Joined
    May 2004
    Location
    Scotland
    Posts
    14,489
    Location
    You can attach a workbook using Manage Attachments in the Go Advanced reply section
    MVP (Excel 2008-2010)

    Post a workbook with sample data and layout if you want a quicker solution.


    To help indent your macros try Smart Indent

    Please remember to mark threads 'Solved'

  8. #8
    VBAX Regular
    Joined
    Mar 2009
    Posts
    14
    Location
    My hat is off to Kenneth for trying to help out!

    MDMACKILLOP you don't ever need to respond to any of my postings unless you are offering to help. It appears all you do is collect free code and critique everyone elses efforts without making a single effort yourself!

    Kenneth, anytime I could help you...you've got it!

  9. #9
    Administrator
    VP-Knowledge Base VBAX Grand Master mdmackillop's Avatar
    Joined
    May 2004
    Location
    Scotland
    Posts
    14,489
    Location
    It is not a solution, but the code is much larger than what I can post in a vba window
    You imply that you want to post code. I'm simply advising a new member (you), how it can be done.
    MVP (Excel 2008-2010)

    Post a workbook with sample data and layout if you want a quicker solution.


    To help indent your macros try Smart Indent

    Please remember to mark threads 'Solved'

  10. #10
    Moderator VBAX Wizard lucas's Avatar
    Joined
    Jun 2004
    Location
    Tulsa, Oklahoma
    Posts
    7,323
    Location
    BackJack is banned, permanently.
    Steve
    "Nearly all men can stand adversity, but if you want to test a man's character, give him power."
    -Abraham Lincoln

  11. #11
    Moderator VBAX Wizard lucas's Avatar
    Joined
    Jun 2004
    Location
    Tulsa, Oklahoma
    Posts
    7,323
    Location
    After following backjack to this thread and finding the same behavior I banned him. Malcolm has pointed out that he had posted in this thread before I intervened in the other thread and at Malcolm's request backjack is being given one last chance.
    Steve
    "Nearly all men can stand adversity, but if you want to test a man's character, give him power."
    -Abraham Lincoln

  12. #12
    VBAX Regular
    Joined
    Mar 2009
    Posts
    14
    Location

    Goodbye

    !

  13. #13
    Moderator VBAX Wizard Aussiebear's Avatar
    Joined
    Dec 2005
    Location
    Queensland
    Posts
    5,055
    Location
    It would seem that a quite reasonable solution has been voluntarily arrived at, given that the OP has decided to retire from this forum. If ever there needed to be an example of poor contribution to a forum, then I believe that this would easily satisfy the criteria.

    I would like to thank MD for his very even handed approach to this matter despite considerable antagonism from the OP.

    On this basis I am closing this thread.
    Remember To Do the Following....
    Use [Code].... [/Code] tags when posting code to the thread.
    Mark your thread as Solved if satisfied by using the Thread Tools options.
    If posting the same issue to another forum please show the link

Posting Permissions

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