Solved

Problem Solving, Compare 2 Strings???

Posted on 1998-10-27
4
127 Views
Last Modified: 2010-04-30
Hey, I'm trying to have a program that Will have two Text Boxes for the user to enter Strings, Then a command Button to compare the two Strings.      And have a label Giving back information sayign that Text1 is Less than text2 or vice versa???, It's another Newbie Question, and my problem solving skills are working today
0
Comment
Question by:infiniteloop
  • 2
4 Comments
 
LVL 12

Expert Comment

by:mark2150
ID: 1441903
You can do < and > on strings. Suggest that you drive them to uppercase before comparison.

if ucase( text1.text ) > ucase( text2.text ) then ...


0
 

Expert Comment

by:janeausten
ID: 1441904
why don't you just use  the strcomp function?
0
 
LVL 1

Author Comment

by:infiniteloop
ID: 1441905
Only using the statement IFF
not IF, THen, Else statements


0
 
LVL 12

Accepted Solution

by:
mark2150 earned 50 total points
ID: 1441906
iff(ucase( text1.text ) > ucase( text2.text ), ..., ...)

happy now?
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question