code to open another workbook

R

Rob

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top