Start Excel file on remote server

  • Thread starter Thread starter sherban
  • Start date Start date
S

sherban

I have an Excel file that I need to open remotely. The tricky part is that it
has to run on an Excel instance on that remote server. This means that
sharing the directory doeasn't work because the file will open an instance on
my computer. Also remote desktop its not OK because will open another
instance on that remote server. I would appreciate any help. Thank you.
 
sherban said:
I have an Excel file that I need to open remotely. The tricky part is that it
has to run on an Excel instance on that remote server. This means that
sharing the directory doeasn't work because the file will open an instance on
my computer. Also remote desktop its not OK because will open another
instance on that remote server. I would appreciate any help. Thank you.

CreateObject function has an optional parameter that lets you specify the
computer name where the object will be created. Is this not what you want?
 
urkec said:
CreateObject function has an optional parameter that lets you specify the
computer name where the object will be created. Is this not what you want?
Being just a VB novice I had to look up the CreateObject function. Indeed it
looks like this is what I need to use. However in the exemple I found on the
microsoft site they were creating a new file and writing a value in a cell.
Does the function work with just opening an exisitng file and doing nothing
with it? Or I have to create a new file like in the exemple and run a macro
the opens the file I need?
Thank you.
 
sherban via OfficeKB.com said:
Being just a VB novice I had to look up the CreateObject function. Indeed it
looks like this is what I need to use. However in the exemple I found on the
microsoft site they were creating a new file and writing a value in a cell.
Does the function work with just opening an exisitng file and doing nothing
with it? Or I have to create a new file like in the exemple and run a macro
the opens the file I need?
Thank you.

After you create Excel.Application on a remote computer, you should be able
to open an exsisting workbook using Workbooks.Open

Set xlApp = CreateObject("Excel.Application", "MyServer")
Set objWorkbook = xlApp.Workbooks.Open ...

Depending on what you need to do, you may have problems trying to make Excel
visible:

http://msdn2.microsoft.com/en-us/library/aa262700.aspx
 
urkec said:
[quoted text clipped - 12 lines]
the opens the file I need?
Thank you.

After you create Excel.Application on a remote computer, you should be able
to open an exsisting workbook using Workbooks.Open

Set xlApp = CreateObject("Excel.Application", "MyServer")
Set objWorkbook = xlApp.Workbooks.Open ...

Depending on what you need to do, you may have problems trying to make Excel
visible:

http://msdn2.microsoft.com/en-us/library/aa262700.aspx
Thank you. I'll give it a try.
 
Back
Top