Re: Use event to catch the running of a macro from an add-in
- From: "Jim Cone" <james.coneXXX@xxxxxxxxxxxxxx>
- Date: Wed, 7 May 2008 16:09:33 -0700
Maybe, but it still all starts by clicking the "Download" menu item.
So run your own sub when you want to "download"...
'--
Sub MakeItHappen
On Error GoTo Snafu
Application.EnableEvents = False
Application.CommandBars(1).Controls("Custom").Controls("Download").Execute
Snafu:
Application.EnableEvents = True
End Sub
'--
Above assumes the Custom menu is on the menu bar.
Also, as Tim Williams pointed, out that you can't control whether the
Download routine switches Events back on or when it finishes.
--
Jim Cone
Portland, Oregon USA
http://www.realezsites.com/bus/primitivesoftware
(Excel Add-ins / Excel Programming)
<legacyvbc@xxxxxxxxx>
wrote in message
No luck meaning that I can't see the name of the sub. The macro is
called by a dll so I don't know how to figure out what call that is.
I am guessing it just isn't possible.
Thanks
On May 6, 2:50 pm, "Jim Cone" <james.cone...@xxxxxxxxxxxxxx>
wrote:
I failed to renew my psychic hotline subscription.
No luck means what? ...
Couldn't find a macro name? or the MySubstitute sub failed at the "something"
line with a "description here" error? or Excel crashed? or ...
--
Jim Cone
Portland, Oregon USAhttp://www.realezsites.com/bus/primitivesoftware
(Excel Add-ins / Excel Programming)
<legacy...@xxxxxxxxx>
wrote in message
No luck - any other ideas?
Thanks
On May 6, 10:21 am, "Jim Cone">
<james.cone...@xxxxxxxxxxxxxx> wrote:
First thing I would try is to see if you can determine the name of the
sub called by the Download menu item... View (menu) | Tools | Customize
and right-click the menu item and see what "assign macro" tells you.
If that works then substitute your own sub for the one assigned to the menu item.
'--
Sub MySubstitute()
On Error GoTo BadChoice
Application.EnableEvents = False
Call MacroAssignedToMenuItem
BadChoice:
Application.EnableEvents = True
End Sub
--
Jim Cone
Portland, Oregon USA
http://www.realezsites.com/bus/primitivesoftware
(Excel Add-ins / Excel Programming)
<legacy...@xxxxxxxxx>
wrote in message
Is there a way to determine when a macro from a 3rd-party add-in has
started running and when it has finished?
For example, lets say I have a 3rd party add-in that downloads data
from the internet and has a custom menu called Custom with a submenu
called Download. If I select download I would like to "catch" that it
was called and set application.enableevents to false and then whenever
it is done I would like to turn it back on.
Is this possible?
Thanks
.
- References:
- Use event to catch the running of a macro from an add-in
- From: legacyvbc
- Re: Use event to catch the running of a macro from an add-in
- From: Jim Cone
- Re: Use event to catch the running of a macro from an add-in
- From: legacyvbc
- Re: Use event to catch the running of a macro from an add-in
- From: Jim Cone
- Re: Use event to catch the running of a macro from an add-in
- From: legacyvbc
- Use event to catch the running of a macro from an add-in
- Prev by Date: Re: Warning message while macro runs
- Next by Date: Re: Grab all filtered rows for some action
- Previous by thread: Re: Use event to catch the running of a macro from an add-in
- Next by thread: Re: Use event to catch the running of a macro from an add-in
- Index(es):
Relevant Pages
|