April 2006
Beginner
1114 pages
98h 16m
English
Application.VBE
Returns the VBE object that represents the Visual Basic Editor. The following code displays the Visual Basic Editor:
Private Sub cmdViewCode_Click( )
On Error Resume Next
Application.VBE.MainWindow.Visible = True
' An error occurs if security settings prohibit this.
If Err Then
MsgBox "You must change Macro security options " & _
"before you can view code in this way. " & _
"Choose Tools>Macro>Security>Trusted Publishers and " & _
"select Trust access to Visual Basic Project."
End If
End SubRead now
Unlock full access