Re: Use event to catch the running of a macro from an add-in



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

.



Relevant Pages

  • Re: HELP!! Download data to workbook
    ... Private Sub Workbook_Open ... WaitForLoad objIE ... 'Page that has data I need to download ... but I need code either to click the excel icon(export to ...
    (microsoft.public.excel.programming)
  • Remove all macros and objects in Excel, Save and Quit
    ... workbooks and quits Excel. ... Sub main ... Sub RemoveAllMacros(ByVal objdocument As Object) ... On Error GoTo 0 ...
    (microsoft.public.excel.misc)
  • Re: Disable screensavers from Excel
    ... Telstra Fleet ... Sub DisableScreenSaver() ... On Error GoTo 0 ... > Is there a way to disable the Windows XP screen saver from an Excel> macro? ...
    (microsoft.public.excel.programming)
  • Re: Loading excel
    ... module for a Workbook_Open procedure that might be affecting this? ... this will open it for you when starting Excel: ... Sub Workbook_Open ... On Error GoTo 0 ...
    (microsoft.public.excel.misc)
  • Re: sorting blocked senders list
    ... You can do that through the following script and Excel. ... EditList:' Open csv file by Excel ... Sub SaveList ... On Error GoTo 0 ...
    (microsoft.public.windows.inetexplorer.ie6_outlookexpress)