View Single Post
 
Old 04-15-2020, 08:40 PM
Guessed's Avatar
Guessed Guessed is offline Windows 10 Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 3,977
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

You've got this post marked as solved - perhaps that is why you aren't getting answers.

As far as I know, you use Split to create a one dimensional array of substrings from a string by supplying the string and the character used to separate the substrings. Therefore your commands to dim and populate the array can only populate one row or column and might look like
Code:
Sub aTest()
  Dim ar() As String, vm As String
  vm = "a,b,c,d,e,f"
  ar = Split(vm, ",")
  Range(ActiveSheet.Cells(1, 1), ActiveSheet.Cells(1, UBound(ar) + 1)).Value = ar
End Sub
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote