Is there a way to loop though a string and pull out each letter and assign it to its own variable that can be recaled using Letter1 letter2 ect?
Sub IndivLetter()
Dim num As Integer
Dim strArray() As String
Dim strText As String
Dim lLoop As Long, lCount As Long
Dim Letter(1 To 20) As Variant
'pull out each letter and assign numeric value
strText = "Thisisareallylongstringtestwithnospaces"
lCount = Len(strText)
ReDim strArray(lCount - 1)
For lLoop = 0 To lCount - 1
y = lLoop
strArray(lLoop) = Mid(strText, lLoop + 1, 1)
Letter & lLoop = strArray(lLoop)
Next lLoop
MsgBox Letter1
MsgBox Letter4
End Sub
I have gotten this to work with a message box but I want to have each letter be assigned as it's own varible or string.
For Counter = 1 To Len(part3)
Letter & Counter = Mid(part3, Counter, 1)
'do something to each character in string
'here we'll msgbox each character
MsgBox Mid(part3, Counter, 1)
Next
Bookmarks