Re: Determine length of a string?
- From: "Lance Wynn" <LanceWynn@xxxxxxxxxxxxxxxx>
- Date: Fri, 12 Jan 2007 09:25:24 -0700
len()
You are already using len() earlier in your code, are you trying to get
something other then the length of the string?
"jamesfreddyc" <jamesfreddyc@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:C43DD391-E6C2-4652-B473-954A5B43E9FD@xxxxxxxxxxxxxxxx
Is there anyway to determine the length of a string value? As you can see
below, "xCriteria" can be 10 characters or many more -- it all depends upon
how many values are added to the listbox by the user.
How do I come up with a ineteger number for the length of "xCriteria"?
'This creates a list of species from the lstboxSpeciesListR selection
Dim xCriteria_input As String
Dim xCriteria As String
xCriteria_input = ""
For xCnt = 0 To frm_RT_Analysis.lstboxSpeciesListR.ListCount - 1
If Not frm_RT_Analysis.lstboxSpeciesListR.Selected(xCnt) Then
If Len(xCriteria_input) > 0 Then xCriteria_input =
RTrim(xCriteria_input) & ","
xCriteria_input = xCriteria_input &
frm_RT_Analysis.lstboxSpeciesListR.List(xCnt)
xCriteria = RTrim(xCriteria_input) & ","
End If
Next
.
- Prev by Date: VBA Command don't recognize Error Trapping
- Next by Date: Requery Method
- Previous by thread: VBA Command don't recognize Error Trapping
- Next by thread: Requery Method
- Index(es):