Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

Troubleshooting
Research
Professional Opinions
Ask a Question
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

troubleshooting Question

How would I ignore a Variable if it returns Null

Avatar of vbMarkO
vbMarkO asked on
Visual Basic.NET
9 Comments1 Solution281 ViewsLast Modified:
RIchTextBox

I am reading rtb1.Lines

   Street addresses are in the rtb1.lines

For Each nLine in rtb1.Lines
   If nLine.Contains("_") Then
       sString = nLine.Substring(0, nLine.IndexOf(":- " & txtStreet.Text ' <--- heresd the problem
   End If
Next


txtStreet.Text some times the addresses ... well I the variables that would contain the address dont always have the right address ... when that hap[pens variable returns NULL and it stops
at sString because of it ...

I hope I am explaining this ok ... here is what I am wanting to know ...

If a variable that is supposed to return a lat & lon has either  nothing or something otther than lat & lon how could I ignore anything but lat & lon

ASKER CERTIFIED SOLUTION
Avatar of joriszwaenepoel
joriszwaenepoelFlag of Belgium image

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Commented:
This problem has been solved!
Unlock 1 Answer and 9 Comments.
See Answers