ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   password userform (https://www.excelbanter.com/excel-programming/380895-password-userform.html)

K1KKKA

password userform
 
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


John Bundy

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




Dave Peterson

password userform
 
See any of your other posts for more replies.

K1KKKA wrote:

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


--

Dave Peterson


All times are GMT +1. The time now is 08:10 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com