AnsweredAssumed Answered

split array in textbox

Question asked by Marco Nawijn on Sep 19, 2016
Latest reply on Sep 19, 2016 by Marco Nawijn

I would like to make an user form that reads multiple data(numbers)  - like different configuration of a model - separated by "space" and use that further to make the drawings for each configuration. My problem is that I can write such an user form ,in Visual Basic 2008 for example, but I have problems in VBA.

In VB 2008 it would be like this:


Private Sub CommandButton1_Click()

    Dim subStrings() As String = TextBox1.Text.Split(" ")

    For Each substring As String In subStrings

        MsgBox (CInt(sbstring) & " is goed")


End Sub


In VB 2008 runs perfect, showing a pop-up window for each inputted value, but when I try to run it in VBA, it highlights ".Text" with the message : Compile error: Invalid qualifier.

Does anyone have an idea?

Thanks in advance...