5 pts.
 Do until loop help!
I'm trying to figure out how to produce an error message if the person doesn't enter an actual string when prompted to enter a product code. If they enter the empty string or push okay/cancel without entering the right product code a msgbox is supposed to pop up. I can't figure it out! This is what I have so far.... (ps i'm supposed to use the Do While method) Dim strInput As String Dim isEmpty As Boolean strInput = InputBox("Enter the product code") isEmpty = True Do While strInput If strInput = " " Then 'Or vbCancel Or vbokay Then isEmpty = True MsgBox "Please enter an appropriate product code" End If Exit Do MsgBox ("Your product code is " & strInput) Loop

Software/Hardware used:
VBA Excel
ASKED: October 29, 2012  10:40 PM
UPDATED: October 29, 2012  10:43 PM

Answer Wiki:
Last Wiki Answer Submitted:  Be the first to answer this question.
All Answer Wiki Contributors:  Be the first to answer this question. ols1224   5 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

Please go to http://pastebin.com (or any other web code repository) and paste your code there. Then put the link to your code into a discussion comment back here. The editor for this forum is having trouble with formatting code, and there are a couple points in your program that are very confusing. — Tom

 110,135 pts.