Try a procedure like
Sub GotoVBA(Optional ModuleName As String)
Application.VBE.MainWindow.Visible = True
ThisWorkbook.VBProject.VBComponents(ModuleName).Co deModule.CodePane.Show
End Sub
ModuleName is the name of the module that you want to activate when
the VBA editor's main window is opened. E.g/.
Sub AA()
GotoVBA "MyCodeModule"
End Sub
Cordially,
Chip Pearson
Microsoft Most Valuable Professional,
Excel, 1998 - 2010
Pearson Software Consulting, LLC
www.cpearson.com
On Fri, 23 Apr 2010 12:51:02 -0700, Craig
wrote:
Hi,
Is there a way I can open the vba editor from a command button?