• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

how to show msg using vba?

mahaveer

Member
i have a command button on user form which have a very long vba code now i want that when i press the exit button then a message show like this:

Please wait......

Your data is saving....

therefore user can not click on screen, and when the command button have completed their work then message should disappear.....is it possible?
 
Hi Mahaveer,


Your request is bit unclear to me. Can you please explain the following:


Does "Exit" button have this very long VBA code?

If yes, then the code will get executed along with any save option that you've written only then the form will close.


If no, VBA macros save changes irreversibly. UNDO doesn't work. However, if someone exits without saving the workbook then all changes may get lost. If this is the scenario then a code like following can be added to exit button code:

Code:
Thisworkbook.save


So which is your case?
 
Thanks shrivallabha


i have a vba code for excel sheet.. i.e.

Application.screenupdating = false

Application.displayalerts = false

Application.screenupdating = True

Application.displayalerts = true


how can i use the same code in user form?

can u tell me?
 
When you are in "Design" mode, double click on the exit button and it will open the coding window, paste the code there. Hope this helps.
 
Back
Top