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: 58
Default Splitting variables with a comma error with slashes

here is the code i was using to split the variable, however
the information is put together like this :

FirstName,Lastname,Mother:1,Mychild,10/12/2007 ,10/11/2007


now the problem im having is when it gets to the date, it doesnt
return the date so TxtServed and TxtIssued are still blank

vntX = Split(strToSplit, ",")

If intChoose = 0 Then
SplitMe = vntX(0) & "," & vntX(1) ' First Name Last Name
ElseIf intChoose = 2 Then
SplitMe = vntX(2) ' MoFa CBo Box
ElseIf intChoose = 1 Then
TxtFirstName = vntX(0) ' First Name
TxtLastName = vntX(1) ' Last Name
CBOMoFa = vntX(2) ' parent type
TxtChild = vntX(3) ' Childs Name
If UBound(vntX) = 4 Then
TxtIssued = vntX(4) ' issued
Else
TxtIssued = ""
End If
If UBound(vntX) = 5 Then
TxtServed = vntX(5) ' served
Else
TxtServed = ""
End If
End If
 
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
Splitting strings, error subscript out of range [email protected] Excel Programming 5 November 9th 07 02:25 PM
Excel Dates w/ No Slashes SDoyle@CAInc Excel Worksheet Functions 3 September 26th 06 09:25 PM
Splitting comma separated lines of an address for mail merge. Chuda Excel Discussion (Misc queries) 1 September 12th 06 01:04 PM
hyphen to forward slashes? bailbust63 Excel Discussion (Misc queries) 3 July 26th 06 12:58 AM
Splitting Cell Contents with a comma Dejan Excel Worksheet Functions 1 October 6th 05 09:14 PM


All times are GMT +1. The time now is 03:00 PM.

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

About Us

"It's about Microsoft Excel"