Opening Excel remotely

  • Thread starter Thread starter ibeetb
  • Start date Start date
I

ibeetb

I have an Excel file on a network which happens to be on a different machine
than the Excel Application I want to open this file

What code would launch the Excel app automatically ( without user
intervention) that is on the network as well as then go and open this excel
file which is also on the network but in a different location from the Excel
App. I thought CreateObject but that doesn't seem to do it

Thanks
 
To open the workbook in the existing Excel session:

Application.Workbooks.Open PathName

- Or, to start a new Excel session:

Dim XLApp As New Excel.Application

XLApp.Workbooks.Open PathName
XLApp.Visible = True

.... Add any additional code here.

And, unless you plan on leaving the book open for your
user, you should end your code with the following (to
close the Excel session and free up the object variable):

XLApp.Quit
Set XLApp = Nothing

K Dales
 

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

Similar Threads


Back
Top