working with file dialog boxes.

K

Karen

I have imported some code provided with the Microsoft Press MS Office 2000
Visual Basic for Application Fundamentals book. This code allows one to
display the the Windows system File Dialog Box. There is also other code
that is typed in a new code module that allows one to use the imported code.
This is that code
------
Sub getfilewithsystemfiledialog()
Dim sFileName As String
Dim udtFileDialog As FileDialog

With udtFileDialog
.CustomFilter = "Order Acknowledgements" _
& Chr$(0) & "oeack*.prt" & Chr$(0) _
& Chr$(0)
.DefaultExt = "oe*.prt"
.Title = "Browse"
.InitialDir = "\\lamotte1\macapps\macsql\data_02"
sFileName = modFileDialog _
.WinFileDialog(udtFileDialog, 1)
End With

If Len(sFileName) > 0 Then
Debug.Print sFileName
End If

End Sub
------

All of this works okay for me.

My question is: Does anyone know how I can change defaults on that dialog
box that is displayed? I would like to have it come up showing the files in
Detail layout and also change the columns of detail shown to show the owner
of the files.

if you need to see the code that was imported, please respond with that
request.

Karen
 
C

Cindy M -WordMVP-

Hi Karen,
Does anyone know how I can change defaults on that dialog [FileDialog]
box that is displayed? I would like to have it come up showing the files in
Detail layout and also change the columns of detail shown to show the owner
of the files.
Create a new line under With udtFileDialog. Now type: .InitialView =
You should now see a list of possible values, one of which should allow you to
view the details. Select that one, then press Tab.

I know of no way to change what columns are displayed, however.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :)
 

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