Call to goto specified module and open to specified function/sub (1 Viewer)

raskew

AWF VIP
Local time
Yesterday, 20:58
Joined
Jun 2, 2001
Messages
2,734
Hi -

Looking for the capability to go to (from a highlighted treeview control) specified module and display specified function/sub.

All suggestions appreciated.

Best wishes - Bob
 

vbaInet

AWF VIP
Local time
Today, 02:58
Joined
Jan 22, 2010
Messages
26,374
Hey raskew,

You can use:
Code:
Application.VBE.ActiveVBProject.VBComponents("Form_[COLOR=Red]FormName[/COLOR]"). _
                CodeModule.CodePane.SetSelection 8, 1, 12, 100
8 = start of code line
1 = start of column
12 = end of line
100 = end of column

Obviously these values were just for demonstration.
 

raskew

AWF VIP
Local time
Yesterday, 20:58
Joined
Jun 2, 2001
Messages
2,734
Hi -

Thanks much for that!

I also answered my own question when I found where I'd used the
OpenModule method of the Microsoft Access DoCmd object

For example, this line of code:

docmd.OpenModule "Utility Functions", "DeleteTableTest3"

would display the DeleteTableTest3 sub in the Utility Functions module.

Thanks again -- Bob
 

vbaInet

AWF VIP
Local time
Today, 02:58
Joined
Jan 22, 2010
Messages
26,374
Well, there you go. That method skipped my mind.
 

Users who are viewing this thread

Top Bottom