find corresponding OnAction

M

meh2030

I have a Toolbar that comes with a company database subscriptoin and
I'm trying to find the .OnAction sub routine that accompanies the
Controls on the Toolbar. The VBA code is password protected, so I
can't just jump into the code and find the sub routine on my own.

I want to be able to insert the Application.Run [macro] into one of
the macros that I'm creating. I thought that the code below would
work to determine the OnAction sub routine, but it returns
"FDS_ON_ACTION" for each Control. Does anyone know how to get the
corresponding OnAction macro? Thanks ahead of time for any help.

Sub findOnAction()
Dim cb As CommandBar
Dim ctrl As Control

Set cb = Application.CommandBars("FactSet")
For Each ctrl In cb.Controls
Debug.Print ctrl.OnAction
Next

End Sub

Thanks,

Matt
 
J

Jim Rech

You have gotten the OnAction macro. It probably branches based on the name
or some other property of the calling control.

--
Jim
|I have a Toolbar that comes with a company database subscriptoin and
| I'm trying to find the .OnAction sub routine that accompanies the
| Controls on the Toolbar. The VBA code is password protected, so I
| can't just jump into the code and find the sub routine on my own.
|
| I want to be able to insert the Application.Run [macro] into one of
| the macros that I'm creating. I thought that the code below would
| work to determine the OnAction sub routine, but it returns
| "FDS_ON_ACTION" for each Control. Does anyone know how to get the
| corresponding OnAction macro? Thanks ahead of time for any help.
|
| Sub findOnAction()
| Dim cb As CommandBar
| Dim ctrl As Control
|
| Set cb = Application.CommandBars("FactSet")
| For Each ctrl In cb.Controls
| Debug.Print ctrl.OnAction
| Next
|
| End Sub
|
| Thanks,
|
| Matt
|
 
M

meh2030

You have gotten the OnAction macro. It probably branches based on the name
or some other property of the calling control.

--

|I have a Toolbar that comes with a company database subscriptoin and
| I'm trying to find the .OnAction sub routine that accompanies the
| Controls on the Toolbar. The VBA code is password protected, so I
| can't just jump into the code and find the sub routine on my own.
|
| I want to be able to insert the Application.Run [macro] into one of
| the macros that I'm creating. I thought that the code below would
| work to determine the OnAction sub routine, but it returns
| "FDS_ON_ACTION" for each Control. Does anyone know how to get the
| corresponding OnAction macro? Thanks ahead of time for any help.
|
| Sub findOnAction()
| Dim cb As CommandBar
| Dim ctrl As Control
|
| Set cb = Application.CommandBars("FactSet")
| For Each ctrl In cb.Controls
| Debug.Print ctrl.OnAction
| Next
|
| End Sub
|
| Thanks,
|
| Matt
|

So, is there a way to trace the branching, or maybe a way to find out
the sub/function routines that are in the password protected module?
 
J

Jim Rech

So, is there a way to trace the branching

Not without access to the code.

--
Jim
| > You have gotten the OnAction macro. It probably branches based on the
name
| > or some other property of the calling control.
| >
| > --
| >
| > | > |I have a Toolbar that comes with a company database subscriptoin and
| > | I'm trying to find the .OnAction sub routine that accompanies the
| > | Controls on the Toolbar. The VBA code is password protected, so I
| > | can't just jump into the code and find the sub routine on my own.
| > |
| > | I want to be able to insert the Application.Run [macro] into one of
| > | the macros that I'm creating. I thought that the code below would
| > | work to determine the OnAction sub routine, but it returns
| > | "FDS_ON_ACTION" for each Control. Does anyone know how to get the
| > | corresponding OnAction macro? Thanks ahead of time for any help.
| > |
| > | Sub findOnAction()
| > | Dim cb As CommandBar
| > | Dim ctrl As Control
| > |
| > | Set cb = Application.CommandBars("FactSet")
| > | For Each ctrl In cb.Controls
| > | Debug.Print ctrl.OnAction
| > | Next
| > |
| > | End Sub
| > |
| > | Thanks,
| > |
| > | Matt
| > |
|
| So, is there a way to trace the branching, or maybe a way to find out
| the sub/function routines that are in the password protected module?
|
 

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