[Solved] VBA: HELP needed for word VBA

  • Looking for help with VBA. I have a form that is locked with drop down form boxes. There are many options in the drop down one being Please Select. I am looking for code so that when nobody has selected this box m when they try to save or send the document a message box appears asking them to fill it in. Only then should it save and send. Is there anyone who can help me here PLEASE.

  • Hi RichLeah and welcome,


    You will need to create a class to handle events within your document.
    Have a look at this pretty clear explanation.
    http://www.mvps.org/word/FAQs/MacrosVBA/AppClassEvents.htm


    For code to check your dropdown form control try something like this in the class,


    It assumes the first entry in the dropdown list is the 'Please Select' style prompt that you do not want left unchanged by the user.


    Cheers
    Andy

    [h4]Cheers
    Andy
    [/h4]

  • I can not get this to work unfortunately. Wondering if you would be able to get it working from the attachment i have sent. I am also looking for it to pop up a box before it is sent as an attachment as well as the before save function. I do not have a lot of experience with VB and have just started to try to understand it. If you could do this and send it back it would be much appreciated.


    Thanks

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!