I'd like to split the textbox value in groups of 8 characters into each empty active unlocked cell (column A and Column B) after the user clicks on the submit button in the UserForm.
So, basically parse the first 8 characters into the first active cell, move to the next cell then parse the next 8 characters into that active cell, and so forth.
Here's what I have so far...
I feel like I'm not using the Split function right in my code (I'm trying to say split textbox value, no delimiter, 8 characters in length)
and I'm missing some kind of "i" statement.
Here's a visual of what I'm looking for:
Before Form Submit ^
After Form Submit ^
So, basically parse the first 8 characters into the first active cell, move to the next cell then parse the next 8 characters into that active cell, and so forth.
Here's what I have so far...
VBA Code:
Private Sub CommandButton1_Click()
Dim myScan As String, cell As Range
myScan = TextBox1.Value
If myScan = "" Then
MsgBox ("No Input")
Else
ActiveCell.Value = UserForm1.TextBox1.Value
For Each cell In Range("A2:B31")
ActiveCell.Value = Split(UserForm1.TextBox1.Value, "", 8)
Next cell
End If
Unload Me
End Sub
I feel like I'm not using the Split function right in my code (I'm trying to say split textbox value, no delimiter, 8 characters in length)
and I'm missing some kind of "i" statement.
Here's a visual of what I'm looking for:
Before Form Submit ^
After Form Submit ^