ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Macro to open seperate workbook (https://www.excelbanter.com/excel-discussion-misc-queries/246950-macro-open-seperate-workbook.html)

ts

Macro to open seperate workbook
 
I have not been able to create a macro to open a seperate workbook
I am in workbook A and would like to run a macro that will open workbook B
--
TS

Bob I

Macro to open seperate workbook
 
Simply Record a Macro while you open the desired Workbook.

TS wrote:

I have not been able to create a macro to open a seperate workbook
I am in workbook A and would like to run a macro that will open workbook B



BSc Chem Eng Rick

Macro to open seperate workbook
 
Here you go. Please note that MyWB is a string variable which is the path of
the workbook you wish to open.

Sub WBOpen()
Dim MyWB As String
MyWB = "C:\Documents and Settings\Rick\My Documents\UpdatedOPEX.xls"
Workbooks.Open MyWB
End Sub

--
If this helps, please click "Yes"
<<<<<<<<<<<


"TS" wrote:

I have not been able to create a macro to open a seperate workbook
I am in workbook A and would like to run a macro that will open workbook B
--
TS


Gord Dibben

Macro to open seperate workbook
 
Macro Recorder is your friend.


Gord Dibben MS Excel MVP

On Thu, 29 Oct 2009 09:58:01 -0700, TS wrote:

I have not been able to create a macro to open a seperate workbook
I am in workbook A and would like to run a macro that will open workbook B




All times are GMT +1. The time now is 11:24 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com