Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Argument 'Length' must be greater or equal to zero.

Status
Not open for further replies.

RSX02

Programmer
May 15, 2003
467
CA
Hi
I have this line that tell me in which position I have a space in my string. I have an error that occur when the string doesn't have any space. How could I solve it?

Cpt1 = Me.Engineer.Text.IndexOf(" ", 1)

An unhandled exception of type 'System.ArgumentException' occurred in microsoft.visualbasic.dll

Additional information: Argument 'Length' must be greater or equal to zero.

Thanks in advance
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top