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!
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!
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
>
Norman,
Thanks!!! Everything worked great, I really appreciate it!
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks