Launch Excel On Event?

R

RayportingMonkey

OK, so this is not a VBA question and not even really an Excel question, so
if this is not the right place to pose the request, kindly point me in the
right direction!

I have a pretty jammin' desktop that I use for development and to run the
automation for my reports - most of which are in Excel. I often work offsite
and use my laptop and VPN connection to access the desktop.

I have automation that grabs my various source files from multiple locations
/ platforms but the timing of these files arriving is not consistent. I need
to get them into my reports as quickly as I can, so I constantly look for
ways to automate this process further!

The issue I am having right now is that I need to launch Excel (on my
desktop) when a certain event occours or a condition becomes true on the
computer and I'm not sure how to do that...

I don't want to simply schedule a task to run at a certian time for various
reasons. I just think it would be best to launch the application when I
"know" it will run successfully.

I guess the "old-school" method woud be to setup a TSR-Program, but I can't
find any info on how to do that and Windows Scheduler only deals with
date/time or login variables, so I don't see how I could make that work.

Any help is appreciated - thank you so much.

Later-
Ray
 
J

Jennifer

You might get an answer out of the VB Scripting group -
microsoft.public.scripting.vbscript. I know I've seen questions
similar to yours there, along with some answers. Just be sure to
explain what condition or event you are looking for as the trigger to
opening Excel.

HTH...Jen
 
R

RayportingMonkey

Thanks for the suggestion - this more or less came from
"microsoft.public.scripting.vbscript"

openexcel

Sub openexcel()

MsgBox "Start"

Dim xlObj

Set xlObj = CreateObject("excel.application")
xlObj.Workbooks.Open "C:\Folder\FileName.xls"
xlObj.Run "MacroName"
xlObj.ActiveWorkbook.Saved = True
xlObj.ActiveWindow.Close
xlObj.Quit
Set xlObj = Nothing

MsgBox "End"

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