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

Are you missing an "End if"?

"pswanie" wrote:

this is what i got and what im using...

i tried moving that one line up/down but with no luck. somewhere it said
something about a with. but that did not work either

Private Sub CommandButton5_Click()

If Me.TextBox55.Value = "b" Then

Application.Visible = True
Application.VBE.ActiveCodePane.Show
Unload UserForm1

Else


MsgBox " This part is restricted" & vbNewLine & _
"Password required/Invalid Password" & vbNewLine & vbNewLine
& _
" Please retry"
End If

End Sub