View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Justin[_15_] Justin[_15_] is offline
external usenet poster
 
Posts: 5
Default Array of values in 1 textbox

I am trying to get the end result to be
row 1: name 1
row 2: name 2
row 3: name 3

from 1 textbox where the input is:
name 1
name 2
name 3

Gary Keramidas wrote:
not sure what you're trying to do, but this worked for me

Private Sub TextBox1_Change()
Dim mediaArray() As String
Dim i As Long
mediaArray = Split(textbox1.Value, vbNewLine)
For i = LBound(mediaArray) To UBound(mediaArray)
Debug.Print mediaArray(i)
Next
End Sub