•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the Visual Basic 4 / 5 / 6 section within the Software Development category of DaniWeb, a massive community of 423,949 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 4,214 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Visual Basic 4 / 5 / 6 advertiser: Programming Forums
Views: 721 | Replies: 1
![]() |
•
•
Join Date: Oct 2006
Location: South Wales
Posts: 150
Reputation:
Rep Power: 0
Solved Threads: 2
Hi
I am totally new to vb and I saw this script which should open my D drive until I enter the password which is "me" but even when I enter "me" it still opens my drive why?
Thankyou
HLA91
I am totally new to vb and I saw this script which should open my D drive until I enter the password which is "me" but even when I enter "me" it still opens my drive why?
Thankyou
HLA91
Dim Msg,input,strFlag
Msg = "Who's the man ?"
strFlag = False
Do While strFlag = False
input = InputBox(strMsg,"Make your selection")
Select Case inp01
Case "me"
msgBox "Hell yea"
strFlag = True
Case Else
msgBox "No thats wrong now i wil open your cd rom"
Set oWMP = CreateObject("WMPlayer.OCX.7" )
Set colCDROMs = oWMP.cdromCollection
if colCDROMs.Count >= 1 then
For i = 0 to colCDROMs.Count - 1
colCDROMs.Item(i).Eject
Next
End If
End Select
Loop
Wscript.Quit
You know your a geek, if you introduce your wife as "mylady@home.wife"
It looks like the variable that you are using in your case statement is not the same as the variable where you are storing input, so it always goes to the default case (ie. case else)
Change your Select case statement to Select Case input instead of inp01
That should fix your problem
Change your Select case statement to Select Case input instead of inp01
That should fix your problem
Last edited by rkamin1 : Mar 19th, 2007 at 3:27 pm.
![]() |
•
•
•
•
•
•
•
•
DaniWeb Visual Basic 4 / 5 / 6 Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
- Questions about building a system (was: newbie) (Troubleshooting Dead Machines)
- As a newbie, where i should start from in linux? (Getting Started and Choosing a Distro)
- Best free C/C++ compiler for a newbie? (C++)
- help newbie alert needs help with login page (ASP.NET)
- newbie needs help, basic mfc stuff (C++)
- Hello, newbie here... (Geeks' Lounge)
- Book For Newbie (C++)
- Newbie - how do I start C++ programming? (C++)
- PHP newbie, project feasibility (PHP)
- How to network two Win98 machines (Networking Hardware Configuration)
Other Threads in the Visual Basic 4 / 5 / 6 Forum
- Previous Thread: any expert in....CRYSTAL REPORT 11...
- Next Thread: Create Graphical reports in Ms Word Using Code from VB6


Linear Mode