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!

Error: Please check your email address.
Rocket to Success - Your 10 Tips for Smarter ERP System Selection
Keep up with the latest tech news, reviews and previews by subscribing to the Good Gear Guide newsletter.

George Campbell

PC World
Show Comments



Sansai 6-Outlet Power Board + 4-Port USB Charging Station

Learn more >



Back To Business Guide

Click for more ›

Most Popular Reviews

Latest Articles


PCW Evaluation Team

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.

Walid Mikhael

Brother QL-820NWB Professional Label Printer

It’s easy to set up, it’s compact and quiet when printing and to top if off, the print quality is excellent. This is hands down the best printer I’ve used for printing labels.

Ben Ramsden

Sharp PN-40TC1 Huddle Board

Brainstorming, innovation, problem solving, and negotiation have all become much more productive and valuable if people can easily collaborate in real time with minimal friction.

Sarah Ieroianni

Brother QL-820NWB Professional Label Printer

The print quality also does not disappoint, it’s clear, bold, doesn’t smudge and the text is perfectly sized.

Ratchada Dunn

Sharp PN-40TC1 Huddle Board

The Huddle Board’s built in program; Sharp Touch Viewing software allows us to easily manipulate and edit our documents (jpegs and PDFs) all at the same time on the dashboard.

Featured Content

Product Launch Showcase

Latest Jobs

Don’t have an account? Sign up here

Don't have an account? Sign up now

Forgot password?