I am trying to get the value of a textbox and save it to a string array by clicking a button. I am getting a syntax error on the name(0) = TextBox1.Text line. I will be making it a dynamic array once I figure out how to do it (that's why I have a num variable as well because the button can be clicked multiple times).
Am I doing something wrong here?
Private Sub CommandButton1_Click()
Dim name(10) As String
Dim num As Integer
' Debug.Print TextBox1.Text
name(0) = TextBox1.Text
End Sub