input box to not allow blanks

moxy85

Board Regular
Joined
Nov 25, 2009
Messages
57
I've got a set of input boxes which collect information from the user,

how can I make it so that the input boxes MUST have data entered before allowing the user to progress to the next box?

Thanks in advanced.
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
Hello,

Does this help?

<font face=Courier New><SPAN style="color:#00007F">Sub</SPAN> i()<br><br><SPAN style="color:#00007F">Dim</SPAN> a<br><SPAN style="color:#00007F">Dim</SPAN> b<br><br><br>aRestart:<br>    a = InputBox("a", "A", "a")<br>    <SPAN style="color:#00007F">If</SPAN> a = "" <SPAN style="color:#00007F">Then</SPAN><br>        MsgBox "A must be entered"<br>        <SPAN style="color:#00007F">GoTo</SPAN> aRestart:<br>    <SPAN style="color:#00007F">Else</SPAN><br>        MsgBox a<br>    <SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">If</SPAN><br><br>bRestart:<br>    b = InputBox("b", "B", "b")<br>    <SPAN style="color:#00007F">If</SPAN> b = "" <SPAN style="color:#00007F">Then</SPAN><br>        MsgBox "B must be entered"<br>        <SPAN style="color:#00007F">GoTo</SPAN> bRestart:<br>    <SPAN style="color:#00007F">Else</SPAN><br>        MsgBox b<br>    <SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">If</SPAN><br><br><br><br><SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">Sub</SPAN></FONT>
 
Upvote 0

Forum statistics

Threads
1,224,586
Messages
6,179,726
Members
452,939
Latest member
WCrawford

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top