Display dialogue boxes in VBA macros

Until Office 97 introduced Visual Basic for Applications - Office's macro language - the task of creating a standard Word dialogue box to accept user input was tedious, involving several lines of obscure code. With VBA, available in Word 97 and 2000, it's a simple one-line operation, but you might miss the commands if you don't know where to look. Here's the drill to use while editing a macro:

1. Select Tools-Macro-Macros.

2. Choose an existing macro and click Edit or type in a new macro name and click Create.

3. Type Dialogues ( at the start of any line in the Macro Editing window.

4. Double-click the desired dialogue box constant name in the drop-down list. (In the example shown, wdDialogueFileOpen.)5. Type ). (a right parenthesis followed by a period).

6. Double-click Show in the drop-down list.

Join the newsletter!


Sign up to gain exclusive access to email subscriptions, event invitations, competitions, giveaways, and much more.

Membership is free, and your security and privacy remain protected. View our privacy policy before signing up.

Error: Please check your email address.
Keep up with the latest tech news, reviews and previews by subscribing to the Good Gear Guide newsletter.

George Campbell

PC World
Show Comments

Father’s Day Gift Guide

Brand Post

Most Popular Reviews

Latest Articles


PCW Evaluation Team

Luke Hill


I need power and lots of it. As a Front End Web developer anything less just won’t cut it which is why the MSI GT75 is an outstanding laptop for me. It’s a sleek and futuristic looking, high quality, beast that has a touch of sci-fi flare about it.

Emily Tyson

MSI GE63 Raider

If you’re looking to invest in your next work horse laptop for work or home use, you can’t go wrong with the MSI GE63.

Laura Johnston

MSI GS65 Stealth Thin

If you can afford the price tag, it is well worth the money. It out performs any other laptop I have tried for gaming, and the transportable design and incredible display also make it ideal for work.

Andrew Teoh

Brother MFC-L9570CDW Multifunction Printer

Touch screen visibility and operation was great and easy to navigate. Each menu and sub-menu was in an understandable order and category

Louise Coady

Brother MFC-L9570CDW Multifunction Printer

The printer was convenient, produced clear and vibrant images and was very easy to use

Edwina Hargreaves

WD My Cloud Home

I would recommend this device for families and small businesses who want one safe place to store all their important digital content and a way to easily share it with friends, family, business partners, or customers.

Featured Content

Product Launch Showcase

Don’t have an account? Sign up here

Don't have an account? Sign up now

Forgot password?