|
-
May 18th, 2003, 12:40 PM
#1
Thread Starter
Addicted Member
Is this possible? [Resolved]
VB Code:
Select Case Extention
Case "com"
Case "exe"
Case "gif" Or "jpg" 'Or "jpeg" Or "jpe" Or "psd" Or "pdd" Or "bmp" Or "pict" Or "pcx" Or "tif" Or "tiff" Or "png"
ImageNum = 10
Case "mp3" 'Or "wav" Or "ram" Or "ra" Or "rm" Or "au"
ImageNum = 6
Case "txt"
Case "zip"
Case Else
ImageNum = 5
End Select
Well I know that the code I posted won't work, but is there a similar way to do it? Or must I type every single last CASE statement?
Last edited by INF3RN0666; May 18th, 2003 at 03:11 PM.
-
May 18th, 2003, 12:42 PM
#2
Instead of using 'Or', just use a comma.
Laugh, and the world laughs with you. Cry, and you just water down your vodka.
Take credit, not responsibility
-
May 18th, 2003, 12:43 PM
#3
Thread Starter
Addicted Member
WOW...how did i miss that? LOL thanx man! Fewf, saves me sooo much time and typing!
-
May 18th, 2003, 12:50 PM
#4
You might want to use the statement
Select Case LCase$(Extention)
string comparisons are case sensitive. So if Extention happened to be Jpeg, the Case Else would be used.
-
May 18th, 2003, 03:11 PM
#5
Thread Starter
Addicted Member
Don't worry, it's already been taken care of as i assign the value to the variable. But thanx for pointing it out.
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
|