Home |
Search |
Today's Posts |
#11
![]()
Posted to microsoft.public.excel.programming,microsoft.public.word.vba.userforms
|
|||
|
|||
![]()
ParamArray, etc.cannot be used for the particular app
There was a long thread on this topic way back when. Charles Williams and I took the discussion off line. The proposed solution at http://www.decisionmodels.com/downlo...AreasBugBypass works, but is not appropriate for the general case, due to the requirement for Application volatile. I did find some MSFT KB articles that described other instances of this bug, but dag nab it, I don't recall where I saved those articles. -- http://www.standards.com/; See Howard Kaikow's web site. "keepitcool" wrote in message ... Howard, Humbled.. not not defeated :) The BugByPass is one UGLY *******. AND not needed when you dont pass named ranges. There'a much simpler way around it. Note the extra () around the argument in K2 and K3 If you try that with SUM function... This will work:=SUM( Arrays!A1,RefSheet!A1 ) This will fail:=SUM((Arrays!A1,RefSheet!A1)) it'll warn you of illegal use, cause you use union before passing. it to the sum formula :) You should make your UDF use ParamArray (as Sum does internally) Then all examples compute correctly with the exception of ROW 7 where a MultiArea NamedRange is passed. Private Function ProcessParam(ParamArray vntArray()) Dim dblSumFunction As Double Dim vntItem As Variant Dim vntArea As Range For Each vntItem In vntArray dblSumFunction = dblSumFunction + Application.Sum(vntItem) Next ProcessParam = dblSumFunction End Function < email : keepitcool chello nl (with @ and .) < homepage: http://members.chello.nl/keepitcool "Howard Kaikow" wrote: http://www.decisionmodels.com/downlo...AreasBugBypass |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Passing a UDF as an argument to a UDF | Excel Discussion (Misc queries) | |||
Passing properties to a procedure | Excel Programming | |||
Passing an argument to a quote | Excel Programming | |||
Passing an argument to a quote | Excel Programming | |||
Passing a Password to a VBA Procedure | Excel Programming |