View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
John Bundy John Bundy is offline
external usenet poster
 
Posts: 93
Default password userform

A few small errors, and when selecting a range on a worksheet other than
current, it wants you to give sheet name as well. Also be aware that as is
your password is case sensitive.
Sub Sunselect()
Dim PassStr As String

PassStr = InputBox("Enter Password Please", "My Password Prompt
")

If PassStr = "Manager" Then
Sheets("Sun").Select
Sheets("Sun").Range("A11").Select
Else
MsgBox "Wrong Password Entered"
End If


End Sub

--
--
-John
Please rate when your question is answered to help us and others know what
is helpful.

"K1KKKA" wrote in message
ups.com...
Sub Sunselect()
Dim PassStr As String
PassStr = InputBox("Enter Password Please", "My Password
Prompt")

If PassStr = "Manager" Then
Sheets("Sun").Select
Range("A11").Select
Else
MsgBox "Wrong Password Entered"
End If


End Sub


Have created the userform for the above task, but not having much luck
with the code for this

Any help would be appreciated