View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
ryguy7272 ryguy7272 is offline
external usenet poster
 
Posts: 2,836
Default What is the Correct Data Type?

This Data Type appears to be working:
Dim i_pwd As String

I could swear that In tried it before and it didn't work. I guess I posted
my question too quickly; a little trial and error would have revealed a
solution in the same amount of time.


Thanks,
Ryan---

--
RyGuy


"ryguy7272" wrote:

The code below keeps failing.
Dim i_pwd As Variant

i_pwd = InputBox("Please Enter Password to Unhide Sheet", "Unhide Sheet...")
If i_pwd = "" Then
Exit Sub
End If

Select Case LCase(i_pwd)
Case Is = "ryan72"
Worksheets("Ryan - Summary").Visible = True
Sheets("Ryan - Summary ").Select

A message pops up saying, 'Incorrect Password...'
I know the password is correct, I am not sure about the Data Type though.
Can someone please give me some guidance?

Thanks so much,
Ryan---


--
RyGuy