LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 86
Default Case Studies

I have a set of input boxes that all allow a number to be added. The entries
can be:
a. Correct (proceed to the next step)
b. Wrong (doesn't meet a criteria - re-input until correct or blank
c. Blank
The first number can't be blank; subsequent entries can be. If
blank, proceed to the next step*

There are a several ways to do this, including in my order of preference:.
1. Have a multiple-entry input box that would allow input of several
numbers, leaving the others blank.
2. Make it a separate subroutine.
3. Use Cases (I haven't tried this, yet)
4. imbed it in the regular code - what I'm doing, but I'm having difficulty
getting 'out'* on blank entries

Questions:
1. is a multi-entry input box a widget that is available? If so, how can I
get it?
2. What do you experts think is the 'best' approach?
3. How do I get out of a code section without getting into a series of GoTo
statements, that seem to create other problems?

Here's what I'm working with right now...

Do
areaCode2 = InputBox("Enter a Second Area Code, (if required)", "Area
Code 2", "", 80)
If areaCode2 = "" Then GoTo XXX

Set wb = ThisWorkbook
On Error Resume Next
Set wb2 = Workbooks.Open(Filename:=Environ("Userprofile") &
"\Desktop\" & areaCode2 & ".csv", ReadOnly:=True)
If wb2 Is Nothing Then
msg = MsgBox("The Area Code " & areaCode2 & " file does not
exist!" & vbLf & vbLf & "Please try again.", vbExclamation, "Input error")

Else
wb2OK = True
End If
On Error GoTo 0 ' (is '0' the beginning of all the code, or
the 'Do'?)
Loop Until wb2OK = True
XXX:

Suggestions?

Jim Berglund

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Minor puzzle: some UDF calls respect mixed case, others insist on lower case Prof Wonmug Excel Programming 5 May 1st 10 12:32 AM
Changing multiple cell text from lower case to upper case Patti Excel Discussion (Misc queries) 2 January 4th 08 08:35 PM
How do I get personal financial templates(blank) for studies dondada Excel Worksheet Functions 1 September 2nd 06 12:19 PM
Change the text from lower case to upper case in an Excel work boo dave01968 Excel Discussion (Misc queries) 2 December 9th 05 09:09 AM
Accuracy Studies Ginny Excel Discussion (Misc queries) 1 April 1st 05 03:42 AM


All times are GMT +1. The time now is 05:43 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"