Results 1 to 3 of 3

Thread: [RESOLVED] [Excel] How to auto reply msgboxes?

  1. #1
    Junior Member
    Join Date
    Mar 12
    Posts
    17

    Resolved [RESOLVED] [Excel] How to auto reply msgboxes?

    Hi All

    I have made a userform at work that shows up when I open my workbook and shutdown when I close. When I close the workbook Excel has an auto msgbox that ask if I wanna save the document but I dont want my collegues to have this option.

    So my question is:

    Is it posible to make my macro auto reply excels auto msgboxes? or is there an other way to avoid this problem?

    Regards

    Master_A

  2. #2
    PowerPoster
    Join Date
    Dec 04
    Posts
    18,526

    Re: [Excel] How to auto reply msgboxes?

    Is it posible to make my macro auto reply excels auto msgboxes? or is there an other way to avoid this problem?
    yes
    from your userform you can use thisworkbook.saved = true either deliberately on a button click or something, or the Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

  3. #3
    Junior Member
    Join Date
    Mar 12
    Posts
    17

    Resolved Re: [Excel] How to auto reply msgboxes?

    Thanks that solved 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
  •