+ Reply to Thread
Results 1 to 3 of 3

opening file

  1. #1
    Forum Contributor
    Join Date
    10-23-2003
    Posts
    141

    opening file

    Is there a way to have a Macro open a file(s) based on a cell. For example if you had a file name in cell A1 and Cell A2, could excel open those files by running a Macro?


    Any help would be greatly appreciated!

  2. #2
    Norman Jones
    Guest

    Re: opening file

    Hi Steve,

    Try,

    Sub Tester()
    Dim sStr As String

    sStr = Range("A1").Value
    sStr2 = Range("A2").Value

    Workbooks.Open sStr
    Workbooks.Open sStr2

    End Sub

    If the workbooks are not stored in the default folder, then A1 and A2 will
    need to include the full paths to rthe workbooks.

    ---
    Regards,
    Norman



    "STEVEB" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Is there a way to have a Macro open a file(s) based on a cell. For
    > example if you had a file name in cell A1 and Cell A2, could excel open
    > those files by running a Macro?
    >
    >
    > Any help would be greatly appreciated!
    >
    >
    > --
    > STEVEB
    > ------------------------------------------------------------------------
    > STEVEB's Profile:
    > http://www.excelforum.com/member.php...fo&userid=1872
    > View this thread: http://www.excelforum.com/showthread...hreadid=396974
    >




  3. #3
    Forum Contributor
    Join Date
    10-23-2003
    Posts
    141
    Norman,

    Thanks!!! Everything worked great, I really appreciate it!

+ 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