Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Startup Macro Help

Status
Not open for further replies.

makavity

Programmer
Nov 23, 2003
36
0
0
US
My department has a few macros we'd like to run from Excel. We're attempting to use Excel to launch a process in a session, however when running a macro with Excel you can't do any work in Excel until it's finished.

What we're targeting is having an Excel macro open a particular session, then having a startup macro in the session that would do all the work.

The problem is that after setting up the macro in the session to run at startup (options > settings > macro > and adding the startup macro > hitting apply > saving the session) when you close the session and open it up again, the startup macro is not listed. It appears that we never set a startup macro at all in that session.

We're using Attachmate EXTRA! X-treme 8.0. This process has worked with previous versions, but for some reason it isn't staying with the session.

Are there other methods to accomplish what we want? I'm thinking using Excel to open the Attachmate macro and having it open it's own session.

Thanks in advance
 
Does this happen when you start the Session manualy or only when starting it from the Excel Macro?
That is the Same version of Extra I am using and I can set start up macros.
If it works when you open the Session and not when the Excel macro opens the Session, could the macro be opening a different Session than the one you set-up?
Hope this helps in some way...
 
Why not have your Excel call the Extra macro you want to run? Using a start up macro seems messy.
 
Skie I wasn't sure if you could call the Extra macro. I would rather do that, but wouldn't know the code. You'd have to find what object it is and then get it to start, and I'm not a programmer enough to accomplish that.

Also, to answer LearningAsIGo, I'm not getting to the point where I'm calling the macro. I open the session, set it up as a start-up, save it, close it, and then when I open the session again, the session has no start-up macro. I am guessing it's blocked.
 




makavity,

Logically, if you launch Extra from Excel, wouldn't it be to get stuff from your session INTO Excel?

With Excel running, can't you open another instance of Excel, from Excel.exe, and do other things?

Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
Skip - we use Excel to do a number of applications, and when we need to call on one of the EXTRA macros, we just need a pop up box for an item number, quantity, store, etc... depending on the application. Since the macros can run for quite a while, we want to be able to use Excel while the Extra macro is running.

An example, we use Excel to plan closeout items and when an item meets a certain criteria, we'll want the remaining inventory to spread out by balance of sale to all stores, depending on what is available in the multiple warehouses that supply the stores. All of that calculating can take a lot of time, which if all written in Excel would mean we can't use excel until it's finished. By calling an EXTRA macro, we can continue to do our work with the other process working in the background.

We also have the EXTRA macro (or Excel macro) hide the session so the users can't do anything to the session but the specifics that come up in a pop-up window or form.
 




How about a Shell call to start Extra?

Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
Skip, not sure what that is. I am a bit self taught in this area, but if it accomplishes the goal... how does it work and how would you do it?
 




Check out Shell in the VBA Help. Post back if you have questions.

Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
The .exe to run an Extra macro is ebrun.exe. It seems to me like it'd probably be pretty easy to open the extra session (ensure it finishes loading) then run ebrun.exe on the macro.

path\ebrun.exe macroPath\macro.ebs
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top