I currently landed up with a requirement, which is , to jump/navigate
to the code module view
of a command button
of a specific userform.
While it is easy
to view the code window
of the sub modules, using the Application.goto,
it does not appear to be so ,
for the userform code window.
The challenge here to me, seems to be on 2 things.
1) The name of the userform code module window.
2) While the sub modules in VBE, are all unique,
but with the userforms, it does not appear so.
For example -
" Private Sub CommandButton1_Click() "
can exist for any number of userforms.
So putting my requirements more clearly.
In a vba project
with 2 userforms, Userform1 and Userform2,
both having a commandbutton1,
and both buttons having click events
(but diff codes for each button, under the click event),
I wish to view the code under
Private Sub CommandButton1_Click()
for Userform1
using vba code.
Thanks in advance.
to the code module view
of a command button
of a specific userform.
While it is easy
to view the code window
of the sub modules, using the Application.goto,
it does not appear to be so ,
for the userform code window.
The challenge here to me, seems to be on 2 things.
1) The name of the userform code module window.
2) While the sub modules in VBE, are all unique,
but with the userforms, it does not appear so.
For example -
" Private Sub CommandButton1_Click() "
can exist for any number of userforms.
So putting my requirements more clearly.
In a vba project
with 2 userforms, Userform1 and Userform2,
both having a commandbutton1,
and both buttons having click events
(but diff codes for each button, under the click event),
I wish to view the code under
Private Sub CommandButton1_Click()
for Userform1
using vba code.
Thanks in advance.