ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   code to open another workbook (https://www.excelbanter.com/excel-programming/444511-code-open-another-workbook.html)

Rob[_34_]

code to open another workbook
 
I am building an application in one workbook that needs to open
another workbook. Here is the code I wrote:

<Workbooks.Open Filename:="C:\Data1.xlsx"

Private Sub OB2_Click()
Workbooks.Open Filename:="C:\Data\ShOptimizer\Retailer Data.xlsx"
Workbooks.Open Filename:="C:\Data\ShOptimizer\Trip Compare.xlsm"
Windows("Trip Compare.xlsm").Activate
UFShOp.Hide
End Sub


All times are GMT +1. The time now is 09:38 PM.

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