Running Excel

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
halozod
Newbie
Posts: 2
Joined: Sun Dec 06, 2009 3:39 am

Running Excel

Post by halozod » Sun Dec 06, 2009 4:03 am

Hi guys, i had a problem running macro scheduler macros when it need to work with excel, i got it work with create object sub, but it what i was really needing is to work with a already open excel file.
i read this forum almost every day for a while and i see some get object subs from people. But from what i see that getobject sub dont use a already open instance, it just open a file pre-defined that set in script(need to reopen,save to resume if need restart script)
like this one:

Sub Excel(filename)
Set xlapp = GetObject( , "Excel.Application")
xlApp.visible = true
Set xlBook = xlApp.Workbooks.open(filename)

I see something that is what im looking for is a Marcus topic about use already open instance of internet explorer from this topic: http://www.mjtnet.com/usergroup/viewtopic.php?t=4660


Any help is apreciate.
Sorry for my english :oops:


Ivan

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Sun Dec 06, 2009 6:51 pm

I'm not sure if GetObject works with Excel or not. I really think the best approach is to engineer your process so that the script itself opens the Excel file. That way it can manipulate it via COM.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

halozod
Newbie
Posts: 2
Joined: Sun Dec 06, 2009 3:39 am

Post by halozod » Mon Dec 07, 2009 1:47 am

Thanks for reply. From what i tested it only can be manipulate if script create a excel aplication, via createobject or script open a file pre-determined via open command that is what getobject are doing. Is like to work with COM is need to insert something on load of application and this thing cannot be insert after a file is already loaded. I can work to change my script to adapt this case of need to load a file, but if it already open, created it ill be much easy, :D .
There are any program that is can be done? something like excel where i can get data that i need to modify constantly.
I had some performance prob after doing that macro for a while because it work on a web site that has some heavy java stuff and it do on large repeat in short time, then i have a macro trigger that close a annoing window this trigger start to slow down respond time to close that window until this stop macro working property, if someone know something that block any window beside main window be created please share me 8) (is on firefox, and is not considered a pop up)

Thanks people.

Ivan

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts