OPEN file dialog box

D

David

I recorded a macro which changes to a specific folder on
my G drive, and have put a button on my toolbar to run it.
It looks like this:

ChangeFileOpenDirectory _
"G:\CNC\Project Management\0209 State Progress\"

What can I add to this code to also open the OPEN file
dialog box for this folder? The way it is right now, I
have to click on the OPEN file toolbar button after
clicking the button linked to the macro.

Thanks
David
 
W

Word Heretic

G'day "David" <[email protected]>,

Check out the Dialogs object in the VBE help mate.


Steve Hudson
Word Heretic Sydney Australia
Tricky stuff with Word or words

Email: WordHeretic at tpg.com.au


David was spinning this yarn:
 
P

Perry

Pre Office XP use:
Dim d As Dialog
Set d = Dialogs(wdDialogFileOpen)

Office XP onwards use:
Dim d As FileDialog
Set d = Application.FileDialog(msoFileDialogOpen)

Krgrds,
Perry
 
I

Ian

Erm, where exactly is the help information for the Dialogs object? I
can't see it here (using Word97).
 
J

Jonathan West

Ian said:
Erm, where exactly is the help information for the Dialogs object? I
can't see it here (using Word97).

In the entry on the Dialogs collection, there is a link titled "Displaying
built-in Word dialog boxes." If you follow that link, you'll come to another
which is titled "Built-in dialog box argument lists. That is about the sum
total of the help in the VBA help file. These articles may also be of
interest

Getting help with calling Word's built-in dialogs using VBA (and
why doing so can be much more useful than you'd think)
http://word.mvps.org/FAQs/MacrosVBA/WordDlgHelp.htm
 
I

Ian

Jonathan West said:
In the entry on the Dialogs collection,

Jonathan, I've fallen at the first hurdle. I am using Word97, pushed
ALT-F11, clicked Help > Contents and Index > Index, and the closest
entry I could find was "dialog boxes". No sign of "Dialogs collection".
there is a link titled "Displaying
built-in Word dialog boxes." If you follow that link, you'll come to another
which is titled "Built-in dialog box argument lists. That is about the sum
total of the help in the VBA help file. These articles may also be of
interest

Getting help with calling Word's built-in dialogs using VBA (and
why doing so can be much more useful than you'd think)
http://word.mvps.org/FAQs/MacrosVBA/WordDlgHelp.htm

Thanks, I'll take a look at this.
 
J

Jonathan West

Ian said:
Jonathan, I've fallen at the first hurdle. I am using Word97, pushed
ALT-F11, clicked Help > Contents and Index > Index, and the closest
entry I could find was "dialog boxes". No sign of "Dialogs collection".

Type the word "Dialogs" in a code windopw, position the cursor on it, and
press F1. Carry on from there.
 
I

Ian

That's more like it. Thanks Jonathan.

--
Ian


Jonathan West said:
Type the word "Dialogs" in a code windopw, position the cursor on it, and
press F1. Carry on from there.
 

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