• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

How To Open VBE UserForm Window (With Macro)?

I've tried these:

OptionExplicit

Sub OpenMacroNameDirectly

With Application

.Goto "MacroName"

End With

End Sub

''''''''''''''''''''''''''

'Application.VBE.MainWindow.Visible = True

'Application.VBE.ActiveCodePane.Show


They work like a charm, but not with getting in UserForm code (only standard modules).

My guess is because they're all private subs, any ideas are much appreciated as always.


Trying to get directly into the actual code part for userform, not the userform itself.
 
Sub OpenMacroNameDirectly()

With Application.VBE

.ActiveVBProject.VBComponents("UserForm1").CodeModule.CodePane.Show

End With

End Sub


Curious, why do you want to show the code?
 
Back
Top