Microsoft Excel - Convert String Array to Variant Array like "Array("111", "222")" to Array("111", "222")

Asked By Rowland Hamilton on 18-Feb-13 12:20 AM
Folks:

Alt subject title: Remove leading and trailing quotes in vba excel string, array

1) How do I do remove the leading and trailing quotation marks to do this?:

I used a method to create an array that is actually a string, and captured account numbers (text values) like this:
[CODE]
strArray = "Array("111", "222", "333")"
[End CODE]

But I want to convert it to a variant like:
[CODE]
vntArray = Array("111", "222", "333")
[End CODE]

so that I can use LBound and UBound code on the array.

Originally, I tried to use the string, but after getting runtime error type 13 mismatch, I manually copied the debug.print of the array, and redefined it without the leading and trailing quotes, and stopped getting the error.

2) Also, how do I get normal vba code windows on egghead without all the crazy extra characters?

Thanks, Rowland