4 Replies Latest reply on Sep 19, 2016 8:21 AM by Marco Nawijn

    split array in textbox

    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")

          Next

      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...