Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On 30 Jun 2006 09:53:06 -0700, "R Avery" wrote:
Private Const NUM_CHARS As Long = 100 Public Function HOHO() As Variant Dim v ReDim v(0, 0) As Variant v(0, 0) = String$(NUM_CHARS, "a") HOHO = v End Function Public Function HOHO2() As Variant Dim v As Variant v = String$(NUM_CHARS, "a") HOHO2 = v End Function If you specify the member of the array, it seems to work OK. In other words, in function1: HOHO = v(0,0) --ron |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I agree that if i specify the member, then it works, but that is not my
intent. the problem is not returning a single value but rather returning an array. My real application returns an array with multiple members, i just chose to use the single-item array for illustration purposes. If you specify the member of the array, it seems to work OK. In other words, in function1: HOHO = v(0,0) --ron |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On 30 Jun 2006 10:50:23 -0700, "R Avery" wrote:
I agree that if i specify the member, then it works, but that is not my intent. the problem is not returning a single value but rather returning an array. My real application returns an array with multiple members, i just chose to use the single-item array for illustration purposes. If you specify the member of the array, it seems to work OK. In other words, in function1: HOHO = v(0,0) --ron I seem to recall Harlan Grove writing about some obscure limitations that Excel has in handling strings 255 characters under certain circumstances. It is clear that, within the UDF, HOHO does, indeed, contain the long string. Perhaps you could use a Sub to assign elements of the array to various cells. Or perhaps someone else has a proper solution. --ron |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How to truncate list of meaningful words greater than 15 chars tomeaningful words of 8 chars. | Excel Worksheet Functions | |||
sum first 2 chars if 3rd is something... | Excel Discussion (Misc queries) | |||
determine if ea value in a col has more than 20 chars | Excel Discussion (Misc queries) | |||
Removing last three chars | Excel Programming | |||
Validation by counted chars | Excel Programming |