Community discussion forum
Input Box function
-
This thread is for discussions of Input Box function.
-
Advertisement
Simply the fastest line-level profiler for .NET ever
“The low overhead means it has minimal impact on the execution of my program”
Mark Everest, Development Team Leader, Renault F1 Team Ltd.Try out the new ANTS Profiler 4 for yourself. Download your 14-day trial now
-
Does the code for Input Box go in the Load Form section?
-
6 years agoby
Thushan Fernando
Thushan Fernando
Australia :: Melbourne, AustraliaJoined 7 years agoanywhere you wanna dude.
you can do this:
call inputbox("Do you really wanna?")
or
strBox= inputbox("Do ya?")
or even:
savesetting("WhatDa", "Who", "Ha", inputbox("Do da Day"))
not that hard, can be used anywhere you wanna -
Is there a way to protect the contents entered into an input box?
ie..place asterisks over what someone types to protect a password.
If not...how can I prompt a user for input and protect what they enter using VB script...?? -
the later codes don't work!
why? -
Apologies.
DocName = InputBox "Please enter the documents title", _
"Enter Title", "Document 1"
should have been
DocName = InputBox ("Please enter the documents title", _
"Enter Title", "Document 1")
I've corrected the article. -
the codes with the () do it too!
it says "statement invalid outside type block" (and i always put it in the button click...)
and when i press ok it shows me the code:
Private Sub Command1_Click() -in yellow
DocName As String -in blue
and the rest of the code is ok.....
what's the problam?
?????? -
u didn't answer it so i started a new topic:
the codes with the () do it too!
it says "statement invalid outside type block" (and i always put it in the button click...)
and when i press ok it shows me the code:
Private Sub Command1_Click() -in yellow
DocName As String -in blue
and the rest of the code is ok.....
what's the problam?
?????? -
What about if the user chooses Cancel?
I made a small program (guessing game) that uses the inputbox, but how would I go about ending it when they choose cancel and not get an Error? -
To end it, just add the line "exit sub" to your If statement where the string = "".
-
6 years agoby
VB6FREAK
Cooper Sloan - VB6FREAK
Washington State, United StatesJoined 6 years agoDo this....
Code:
i = InputBox("Question: blahblahblah?", "Q&A")
If i = "" Then Exit Sub ' leaves sub if the variable i is null
YOUR CODE HERE
-
6 years agoby
VB6FREAK
Cooper Sloan - VB6FREAK
Washington State, United StatesJoined 6 years agoDo this....
Code:
i = InputBox("Question: blahblahblah?", "Q&A")
If i = "" Then Exit Sub ' leaves sub if the variable i is null
YOUR CODE HERE
-
Can u use Input Box to also collect password (ie starred input) also.
I have a requirement whereby the program has to wait for input of userid and password . Input box works fine but I am not able to make the password as password field. is there any property in input box to achieve this
Or
I have to use something else. If so then what shud i use.
Regards
Tirthankar -
Unfortunately the input box isn't all the flexible. (You can't even hide the Cancel button.) You should use a custom form, it looks neater for getting 2 pieces of info anyway.

-
Suppose they just don't put anything in the box and click OK?
-
what i want is a login form, but i cant get it to keep focus like when you have a messagebox or inputbox open you cant click the main form, how do i do that??
-
Hi
I want to reduce the width of text box on InputBox & to change the location of the Buttons & textbox,
is it possible?
Regards
Mahesh
Post a reply
Quick links
Recent activity
- Simon Cooper replied to "how to implement varifiact...
- chandradev prasad replied to "how to implement varifiact...
- ania g replied to IT Service Desk Analyst
- Jayalakshmi Sanathkumar replied to Taking a long time to Stop ...
- Anjali Thakur replied to Installing windows service ...
- Colm Fitzgerald replied to Reading a weighing scale th...
Enter your message below
Sign in or Join us (it's free).