+ Reply to Thread
Results 1 to 3 of 3

Open workbook in the same directory using workbooks.open

  1. #1
    Registered User
    Join Date
    09-27-2006
    Posts
    5

    Open workbook in the same directory using workbooks.open

    Hi,

    Can Workbooks.open search for the file in the current directory of the workbook that is running the Macro?

    The scenario is I have a Macro which will run on opening a FileA. The Macro should open FileB. FileB is always in the same directory as FileA.

    I have tried Workbooks.Open Filename:="FileB.xls", ReadOnly:=True. But when I run the Macro, it gives me a "file not found" error.

    Can someone help?

    Thanks.

  2. #2
    Forum Expert Simon Lloyd's Avatar
    Join Date
    03-02-2004
    Location
    locked in the cage
    MS-Off Ver
    All the ones my homepage shows
    Posts
    3,161
    Try this:
    Please Login or Register  to view this content.
    Regards,
    Simon

  3. #3
    Registered User
    Join Date
    09-27-2006
    Posts
    5
    It works. Thanks.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1