View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
pswanie pswanie is offline
external usenet poster
 
Posts: 247
Default alt & f11 via macro

i have the said textbox on a userform. the aplication (excell workbook) is
set to visible = valse

now if i enter "mypass" in the textbox it enable commandbutton1.

commandbutton1_click make the application visible = true and unload userform1.

then i can get to my macros etc..


"Matthew Pfluger" wrote:

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