Solved

Best way to write checking textbox

Posted on 2014-09-08
5
98 Views
Last Modified: 2014-09-08
Which is the best way ?
If txtInfo(0) = "" Or Len(txtInfo(0)) < 3 Or mbIsDirty Then
If txtInfo(0) = vbNullString Or Len(txtInfo(0)) < 3 Or mbIsDirty Then
0
Comment
Question by:isnoend2001
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 48

Accepted Solution

by:
Martin Liss earned 500 total points
ID: 40310194
I would do

If Trim(txtInfo(0)) = "" Or Len(Trim(txtInfo(0))) < 3 Or mbIsDirty Then

Also you might be interested in my article on Using Enums.
0
 

Author Closing Comment

by:isnoend2001
ID: 40310210
Thank you
0
 
LVL 48

Expert Comment

by:Martin Liss
ID: 40310248
You're welcome and I'm glad I was able to help.

In my profile you'll find links to some other articles I've written (some of them newly updated) that may interest you.
Marty - MVP 2009 to 2014
0
 

Author Comment

by:isnoend2001
ID: 40310287
I plan on using your Using Enums. in the link i sent
0
 

Author Comment

by:isnoend2001
ID: 40310289
I meant you sent
0

Featured Post

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
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…

690 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