View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Per Jessen Per Jessen is offline
external usenet poster
 
Posts: 1,533
Default automating (alt & f11)

I think this is what you need.

Private Sub CommandButton5_Click()

If Me.textbox1.Value = "mypass" Then
Application.Visible = True
Unload UserForm1
End If

End Sub

//Per

"pswanie" skrev i en meddelelse
...
my previous posting was not clear i think...

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

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

click commandbutton1 go and check if textbox1 contain "mypass"
commandbutton1 make the application visible = true and unload userform1.

then i can get to my macros etc..
i got this.


Private Sub CommandButton5_Click()


Application.Visible = True
Unload UserForm1


End Sub