|
-
Jul 15th, 2003, 10:05 AM
#1
Thread Starter
Lively Member
Select Case Prob [RESOLVED] thx p
I have the following code
PHP Code:
Dim KeyAscii As Integer
KeyAscii = Asc(strPath.Chars(0))
Select Case KeyAscii
Case KeyAscii = 67
cDrive = cDrive + 1
If bDriveC = False Then
intStartingY = intStartingY + 1
oSheet.Cells(intStartingY, 7).Value = strDriveLetter
bDriveC = True
End If
oSheet.Cells(intStartingY, 8).Value = cDrive
intDriveLocation = intDriveLocation + 1
Case KeyAscii = 68
'similar to above code
'.
'.
'.
Case KeyAscii= 90
'similar to above code
End Select
i cant get the cases to be selected, i've tested with msgbox (KeyAscii) and am sure that the Ascii values are correct.
any help would be great
thanks
Last edited by daveStudent; Jul 15th, 2003 at 11:02 AM.
-
Jul 15th, 2003, 10:44 AM
#2
Sleep mode
One thing you can change in your code to look something like this :
VB Code:
Dim KeyAscii As Integer
KeyAscii = Asc(strPath.Chars(0))
Select Case KeyAscii
Case 67
cDrive = cDrive + 1
If bDriveC = False Then
intStartingY = intStartingY + 1
oSheet.Cells(intStartingY, 7).Value = strDriveLetter
bDriveC = True
End If
oSheet.Cells(intStartingY, 8).Value = cDrive
intDriveLocation = intDriveLocation + 1
Case 68
'similar to above code
'.
'.
'.
Case 90
'similar to above code
End Select
Try that .
-
Jul 15th, 2003, 11:18 AM
#3
What Pirate is basically saying is that your syntax is incorrect....
instead of Case KeyAscii = 67, use
Case 67
-
Jul 15th, 2003, 11:26 AM
#4
Thread Starter
Lively Member
yeah i caught that
thx though
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|