0

I am using a couple of arrays defined by e.g.

 public arr1() as variant 

and they strictly need the ()-part after the variable name to work in the preexisting code.

however if I try to rearrange them by 1) joining text by a delimiter ":-:" (filltering out unwanted data in a for-loop), the split function don't work:

arr1=Split(tmpString, ":-:")

And again I am strictly restrained to using the variants as defined above.

I am very greatfull for any help!

8
  • Split returns an array of Strings, so you need to convert the result to an array of Variants, as demonstrated in the linked thread. Commented Aug 4, 2023 at 17:21
  • Thanks, I just found another solution here: stackoverflow.com/questions/37515352/… Commented Aug 4, 2023 at 18:07
  • That's another option, but note it's limited to Excel. The linked solution is host-agnostic. Commented Aug 4, 2023 at 18:08
  • There the solution is to insert the string-array into cells in worksheet and then back again from there to a predefined array() in the variant-form. Worked perfectly :) Commented Aug 4, 2023 at 18:09
  • 1
    Oh, I am sorry, I found out now that it was indeed variant/string. My bad. I were confusing two variables with each other. Thank you for the help. Then i don't need the intermediate steep anymore either :) Have a good weekend Commented Aug 4, 2023 at 18:30

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.