Object array to string array 
Author Message
 Object array to string array

Hello
How can I do this?

Dim objArr as object(,) = {{1,2,3,4},{5,6,7,8}}
dim strArr as string(,)

'this next line I cannot compile - "specified cast is not valid"
strArr = ctype(objArr, string(,))

I've tried other methods, but no success

PS - In the real case, the 2D object array is

objArr = myXLSheet.range("A1").currentregion.value

Thanks

Mark



Fri, 18 Feb 2005 23:52:05 GMT  
 Object array to string array
Unfortunately, the only way to do this is by interating over each element
and doing the string converstion on each element.

JonBraz&GarySp

--
This posting is provided "AS IS" with no warranties, and confers no rights.
(c) 2002 Microsoft Corporation.  All rights reserved.


Quote:
> Hello
> How can I do this?

> Dim objArr as object(,) = {{1,2,3,4},{5,6,7,8}}
> dim strArr as string(,)

> 'this next line I cannot compile - "specified cast is not valid"
> strArr = ctype(objArr, string(,))

> I've tried other methods, but no success

> PS - In the real case, the 2D object array is

> objArr = myXLSheet.range("A1").currentregion.value

> Thanks

> Mark



Sun, 20 Feb 2005 04:33:03 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. String to Array and Array to String

2. Converting a string array into a double array

3. Converting string array to byte array

4. How do I get a string from an Object (byte array)

5. Problem while testing string array argument of ATLCom object in VB script client

6. Text string data from vb array converted to numeric in excel object

7. Arrays in Collections, Arrays in Arrays

8. Array of Arrays and 2D array

9. String data conversion from byte array to a string

10. BinaryRead - howto convert binary string back to string array

11. How to store object to an object array?

12. Passing data arrays from object to object

 

 
Powered by phpBB® Forum Software