msgbox prompts?

J

jatman

my first macro word form is almost done. i have one question now. where can
i find information on msgbox messages, prompts, and if then rules for msgbox.


example:

msgbox #1 Help or Ok vote buttons

Help button gives instructions msgbox with OK button only. when OK is
pressed, document closes.

OK from msgbox #1 gives new message box #2 with YES/NO options. if Yes
then msgbox closes and user uses document. if NO then user gets msgbox with
OK button only, when OK is pressed msgbox closes, and user uses document.

this is what i have so far:

msgbox "Users must enable the Word macros prior to the first use. press
OK to continue, or Help for detailed instructons", vbMsgBoxHelpButton
If userinput = OK Then
msgbox "have you used this form b4?", vbYesNo
If userinput = No Then
msgbox "instructions for form macro"
End If
End If

jat
 
J

jatman

ok, ignore the initial request, because i have most of it figured out now. i
only have one issue left (there's always one issue left)

the document is a macro enabled word template (Office 2007)

in the macro i have the following code:

Application.DisplayAlerts = wdAlertsNone
ActiveDocument.Close , SaveChanges = False

what i would like is the template to close without any prompts or alerts -
just shut down the template. no matter how i write these lines, i always get
the SaveAs dialogue box!

any suggestions on how to just shutdown the tempalte without any SaveAs boxes?

thank you,
 
G

Graham Mayor

Lose the comma and add a colon!

ActiveDocument.Close savechanges:=False


--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top