Results 1 to 2 of 2
  1. #1
    Lounger
    Join Date
    Feb 2001
    Location
    Upstate, New York, USA
    Posts
    47
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Another File|Open question... (Excel 2000/SR2)

    OK, now I know how to get the File|Open dialog box (thanks to everyone for their help).

    Now I'd like to be able to set the location of the File|Open dialog box to the same drive/directory that the original XL file was opened from (e.g., if the XL file was opened from a CD, how can I get the File|Open dialog to open the CD drive, wherever that may be mapped)?

    If you need more info, please let me know. Thanks in advance for any help.

    Kyle

  2. #2
    Silver Lounger
    Join Date
    Mar 2001
    Location
    Springfield, Ohio, USA
    Posts
    2,136
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Another File|Open question... (Excel 2000/SR2)

    Assuming that you are still interested in opening a Word document, here's what you need:
    <pre>Option Explicit
    Sub Macro1()
    Dim wdApp As New Word.Application
    Dim wdDoc As Word.Document
    wdApp.Visible = True
    wdApp.ChangeFileOpenDirectory ActiveWorkbook.Path
    wdApp.Dialogs(wdDialogFileOpen).Show
    Set wdDoc = wdApp.ActiveDocument
    ' do more with wdDoc
    End Sub</pre>

    <font face="Comic Sans MS">Sam Barrett, CACI </font face=comic>
    <small>And the things that you have heard... commit these to faithful men who will be able to teach others also. 2 Timothy 2:2</small>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •