Home |
Search |
Today's Posts |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
It is difficult to tell how you have the input box set up, but I will try to
give you a general solution that you can apply. Normally, you would set up your validation loop to fire immediately after the user makes or does not make the input. Here is one example. RETRY: myResult = InputBox("Enter something", "Title") If myResult = "" Or myResult = False Then GoTo RETRY: Else 'You regular code End If This will force them to put something in the input box. The problem is, that they could put anything in there and that might cause an error in the regular processing. If you have specific data that needs to be entered that the user could choose from, it might be better to build a UserForm that provides the user with a list to select from and control their selection that way. " wrote: Hey everyone... I'm working on a macro with an inputbox and I don't want there to be any empty boxes. I want the user to be forced to put *something* in the boxes before the code will continue. I'm imagining it has to go somewhere in my FOR NEXT loop... For Each cItem In Me.Controls If TypeName(cItem) = "TextBox" Then 'another if statement here? PLEASE HELP!! sSPN = sSPN + cItem.Value + "-" End If Next cItem |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Empty Chart Values | Excel Worksheet Functions | |||
Match Inputbox Value on Values in Column | Excel Programming | |||
Fix InputBox - Returning Empty String | Excel Programming | |||
Coping values to the next empty row | Excel Programming |