Thread
:
Passing a String in Array to Range as String
View Single Post
#
2
Posted to microsoft.public.excel.programming
Alan Beban[_2_]
external usenet poster
Posts: 783
Passing a String in Array to Range as String
wrote:
If I have an array that contains strings - some of which are numbers as
strings, why can't I write them to a range as a string?
For example if Array(1) = "000"
Why can't I say
Range("A1").Offset(1,1) = Array(1)
What I'm getting is 0 (without the leading 2 zeros) and when I do a
=IStext() test in the worksheet, I'm getting False.
The following seems to work:
Dim arr
arr = Array("000", "001", "002")
Range("A1").Offset(1, 1).NumberFormat = "@"
Range("A1").Offset(1, 1) = arr(1)
Alan Beban
Reply With Quote
Alan Beban[_2_]
View Public Profile
Find all posts by Alan Beban[_2_]