Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Greetings All,
I am trying to understand why this function does not work. Any suggestions would greatly be appreciated it. Public Function GetArray(ByVal rng1 As Range, ByVal rng2 As Range) As String ' rng1 is a 1-cell range; rng2 1-cell range Dim vReturn As Variant Dim oSecret As Object Dim i As Integer On Error GoTo ErrorHandler Set oSecret = CreateObject("SomeDLL.Class") vReturn = oSecret.GetSecretArray(rng1.Cells.Value) GetArray = vbNullString For i = 0 to UBound(vReturn) Step 1 GetArray = GetArray & vReturn(i) ' this is line is fine rng2.Cells(i + 1).Value = vReturn(i) ' this line kicks the function out; rng2.Offset(i) does not work either, rng2.<whatever.FormulaR1C1 does not help either Next i Exit Function :ErrorHandler MsgBox Err.Description End Function |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Conditional Sum without Range Parameters | Excel Worksheet Functions | |||
How can I sum a range using two parameters (eg location & date) | Excel Discussion (Misc queries) | |||
change parameters of a range to be summed | Excel Worksheet Functions | |||
Function Parameters | Setting up and Configuration of Excel | |||
Count cells in one range based on parameters in another range | Excel Worksheet Functions |