Using Object model to start an instance of excel on another computer?

  • Thread starter Thread starter P
  • Start date Start date
P

P

Hi everybody, thanks in advance for the feedback.
I am automating some excel sheets from VB. What I have now is the
below code that calls up an excel sheet and sets it running. This works
great when everything runs locally on my comp. Code below:

Sub foo()
Dim bar As Object
Dim ws As Object
Set bar = CreateObject("Excel.Application")
bar.Visible = True
Set ws = bar.Workbooks.Open("C:\Documents and Settings\p\My
Documents\book1.xls")
bar.Run "thisworkbook.doAnalysis"

End Sub

Is there any way to make the isntance of excel come up and start
running on a different computer?

I've tried this for the createObject call but it doesn't seem to be
working:

Set bar = CreateObject("Excel.Application", "otherCompName")

Any ideas?
Thanks,
P
 
Wow. Okay. I’m going to point you to a blog post of mine because it
basically covers the problems you are going to encounter when you try to run
your stuff on someone else’s machine and it’s pretty long.
http://krgreenlee.blogspot.com/2006/03/digipede-distributing-excel_10.html.
You’ll find on that page the things I’ve figured out about how to automate
Excel on someone else’s machine as well as links to relevant Microsoft
articles. That blog post is part of a collection of posts about running
Excel on a compute grid but you can pick out the pieces that are relevant to
you.

You might be interested in a VBS script I use called RunExcel.vbs which I
talk about in this post here
http://krgreenlee.blogspot.com/2006/04/excel-running-excel-on-windows-task.html.

All the above will get you through the automation problems. The only
techniques for starting Excel remotely that come to mind are to a) build a
windows application or service that runs your Excel stuff and install that on
each computer, or b) use the Windows Task Scheduler on each machine to start
your Excel stuff. My second blog post above talks about how to do this, or
c) remote into their desktop and run your stuff.

There may be a technology for you to directly control execution of your
application on other people’s boxes without remoting in but I don’t know what
it is.

Good luck,

Kim Greenlee
 

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

Back
Top