Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,836
Default What is the Correct Data Type?

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default What is the Correct Data Type?

I don't think it was the declaration--although I would have use "as String",
too.

I don't think you typed in the correct password in the inputbox.

Or something else happened in the part of your code that you didn't share.

ryguy7272 wrote:

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


--

Dave Peterson
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,836
Default What is the Correct Data Type?

I'm fairly certain that I typed the correct password. I thought it had
something to do with the number, the 72-part. I tried it with another
password, such as 'showryan', and that worked, but the 'ryan72' didn't
work...at least at first. I thought the 72-part was not considered text so
it wouldn't work as a String. I don't know what the problem was, but it
appears to be resolved now. Thanks, for getting back to me Dave.

Regards,
Ryan---

--
RyGuy


"Dave Peterson" wrote:

I don't think it was the declaration--although I would have use "as String",
too.

I don't think you typed in the correct password in the inputbox.

Or something else happened in the part of your code that you didn't share.

ryguy7272 wrote:

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


--

Dave Peterson

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
filtering he data is not always correct Frank Situmorang Excel Programming 2 November 2nd 07 08:30 AM
Comparing Data (Im not sure if that is the correct tern) AngelaD Excel Discussion (Misc queries) 1 January 16th 07 04:55 PM
Check a column for correct type of data TWilson Excel Programming 1 October 19th 06 02:34 PM
Import data not in correct format jlt Excel Discussion (Misc queries) 0 August 22nd 05 07:22 PM
Pivot table converts data to a 1,2,3 how do I get data to correct mjohnston1327 Excel Discussion (Misc queries) 1 August 17th 05 10:28 PM


All times are GMT +1. The time now is 01:26 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"