R
ryguy7272
A short time ago I saw an interesting post on this DG. I tried to run the
code, but no matter what I did, it didn’t work (I couldn’t get the code to
fire; nothing happed). Below is the VBA:
Const lngLimit As Long = 500
Dim lngCount As Long
Dim lngSplits As Long
Dim strArray() As String
Dim strText As String
strText = "String to split..."
lngSplits = Len(strText) \ lngLimit
If Len(strText) Mod lngLimit = 0 Then
lngSplits = lngSplits - 1
End If
ReDim strArray(0 To lngSplits)
For lngCount = 0 To lngSplits
strArray(lngCount) = Mid$(strText, lngCount * lngLimit + 1, lngLimit)
Next lngCount
I guess it is supposed to take text in a TextBox and parse it up into
segments of 500 characters, in the TextBox. Again, I can’t get it to work.
What am I supposed to do? Does the text fire from a Form? OD I need a Query
to parse it? How do I run the code?
Thanks,
Ryan---
code, but no matter what I did, it didn’t work (I couldn’t get the code to
fire; nothing happed). Below is the VBA:
Const lngLimit As Long = 500
Dim lngCount As Long
Dim lngSplits As Long
Dim strArray() As String
Dim strText As String
strText = "String to split..."
lngSplits = Len(strText) \ lngLimit
If Len(strText) Mod lngLimit = 0 Then
lngSplits = lngSplits - 1
End If
ReDim strArray(0 To lngSplits)
For lngCount = 0 To lngSplits
strArray(lngCount) = Mid$(strText, lngCount * lngLimit + 1, lngLimit)
Next lngCount
I guess it is supposed to take text in a TextBox and parse it up into
segments of 500 characters, in the TextBox. Again, I can’t get it to work.
What am I supposed to do? Does the text fire from a Form? OD I need a Query
to parse it? How do I run the code?
Thanks,
Ryan---