1

I have declared following variable in excel VBA

>  Dim arrayCollabName as variant 
>  arrayCollabName = Array("Name1","Name2", ....."Name62")

But the Names inside the array are exceeding 1 line in VBA sheet and throwing error

Any suggestion on how to do this without error

1
  • 1
    Do you mean the VBA editor has tried wrapping some of the names in the array onto the next line of code? If so, try adding an underscore to the end of the previous lines. That's the line-continuation character in VBA... Commented Apr 26, 2012 at 13:51

1 Answer 1

3
arrayCollabName = Array("Name1","Name2",..., _
"Name N","Name n+1",...,_
...)

Underscore is the trick to seperate lines.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.