1. JenniferMurphy

    Can a UDF pass a ParamArray to a subroutine for processing?

    I am working on a UDF with several keyword parameters that I am passing from Excel as a ParamArray. To keep the main UDF simpler, I would like to pass the entire ParamArray to a subroutine for processing. I can't get it to work. Here's what I've tried: ' This is the main UDF as called from...
  2. L

    How to Create a Customized Function in Excel VBA for Multiple Matrices Multiplication?

    I want to create a function in Excel VBA that can do matrices multiplication for multiple matrices (undefined numbers of augments). The following is my code (I use ParamArray in this function), but it returns an error. Could anyone help me debug it? Function MultMMult(ParamArray X() As Variant)...
  3. F

    passing a ParamArray to another sub that accepts a ParamArray

    I have a number of subroutines that accept a ParamArray for an indeterminate number of parameters, viz: Sub CheckList(ParamArray vList()) ' ' checks stuff ' End Sub Sub PrintList(sMessage as String, ParamArray vList()) ' ' prints stuff ' CheckList vList CheckList vList() CheckList...
  4. keldsor

    Passing ParamArray to another sub ???

    I want to gather an unkown number of childrens ID's from one sub to another as easy as posible - something like: Public Sub setUpFamily(IdF As Long, IdM As Long, gift As String, ParamArray id()) <<<<<<<<<< FROM HERE !!!!!!!!!!!!!!!!!!!!! danPar IdF, IdM, gift lineUpChildrenTo IdF...
  5. O

    BUG: Run-time error '51' Internal error, ParamArray from Immediate window

    I narrowed it don't to this: Function test(oRange) 'called by A1: =test(B1) test2 oRange 'this works Stop 'BUG: "test2 oRange" in the Immediate window while here in debugmode gives: "Run-time error '51': Internal error" End Function Function test2(ParamArray...
  6. P

    ParamArray - limited by 29 arguments

    Hi guys, I created UDF using paramArray expecting I can use as many params I want (the function will be used under Excel 2003/7/10). However once I exceed 29 params I get an error message "More arguments have been specified for this function that are allowed in the current file format" is...
  7. H

    Passing ParamArray Not Working

    Can't get ParamArray to work. Have looked at numerous examples online. But nothing sees to work. When I select Debug (F8) for the procedure TableRequest, I get an alarm(ding), but none of the VBA statements get highlighted, not even the Sub line. VBA code is below. I would really appreciate a...
  8. O

    Internal error 51 with a range-object to a ParamArray from immediate window ?

    Why do I get an "Internal error" '51' when trying to pass a range-object-parameter to a new sub ParamArray-parameter from the immediate window ? Sub sStart() sTest Selection End Sub Sub sTest(oPar) Set oTest = oPar Stop ' here I type in the immediate window: '...
  9. Darren Bartrup

    VBA Filter missing the last row.

    Hi all, I'm having an annoying problem where I have a small routine to filter a data range to whichever column and argument I pass to it. I've put the routine at the end of this post. It's called using this: SetFilter rMainData, Array(7, "=" & DateValue(Date)), Array(13, "=") This is meant...
  10. C

    Filling an paramarray

    Hello, I wanna achieve this: SliceArray= Worksheetfunction.Index(varArray, (Array(2, 4, 5), 0)) in a more generic style like this Function SliceArray (p_lngStartRow as Long, p_lngEndRow as Long) as Variant Dim varSubArr() as Variant Dim i as Long ReDim varSubArr(1 To (p_p_lngEndRow-...
  11. K

    How to use Paramarray with arguments in pairs?

    Hello, I want to create a VBA function to get the weighted average value of an unspecified number of data points, where each data point is given a certain weight, for example Function WtdAve(Data1, Weight1, Data2, Weght2, ..., etc.) I want to use Paramarray where each data point and its...
  12. U


    Hello Experts, I am struggling with using Paramarrays. Would someone please translate this function to one using a paramarray, please? Function fxConcat(sDelimiter As String, rRange As Range) As String Dim rCell As Range For Each rCell In rRange fxConcat = fxConcat & rCell...
  13. T

    optimise code -> subroutine to function (paramarray??!)

    Currently I do this: Code: For CurrentTableRow = WallTableBeginsRow To WallTableBeginsRow + NumberOfWalls If (Cells(CurrentTableRow, BwkBlkStudCol).Value = "Bwk") And (Cells(CurrentTableRow, FloorCol).Value = "GF") Then GFBWKArrayNumber = GFBWKArrayNumber + 1...
  14. W

    Divide Array into individual ParamArray arguments

    All, Just curious if it was possible to divide an array into individual values (or objects) that could later be passed to a ParamArray argument. For example, say I have an array of ranges, and I wanted to pass the entire array to Application.Union. Right now, the only way I could do this is...

This Week's Hot Topics

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back