View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Matthew Pfluger Matthew Pfluger is offline
external usenet poster
 
Posts: 130
Default alt & f11 via macro

Hello,

Try this:

Sub test()

' Get text box
ActiveSheet.Shapes("Text Box 1").Select

If Selection.Characters.Text = "MyPass" Then
' run sub

' Show VBE window
Application.VBE.ActiveCodePane.Show
End If

' Deselect text box
ActiveCell.Activate

End Sub

HTH,
Matthew Pfluger

"pswanie" wrote:

i got this.

can i add a command so that when i click that it checks that in textbox1 i
got "mypass" and then run the sub

and in that sub add a command to go to the editor ("alt" & "f11")



Private Sub CommandButton5_Click()


Application.Visible = True
Unload UserForm1


End Sub