Questions tagged [paramarray]
50 questions
0
votes
1 answer
Assigning Macro with ParamArray: Formula is Too Complex to add to the Object
I have a macro (below) that inserts a new row into an un-defined number of Named ranges using ParamArray, it works fine except for when I try to assign the macro with more than 5-6 arguments I get a message box that says "Formula Too Complex to…

Anton S.
- 41
- 7
0
votes
0 answers
Using VBA to assemble a list to pass to a function expecting a ParamArray
In a question regarding VBA: Passing multiple values to Instr John Coleman posted a 'Contains' function that accepts multiple search strings that are then fed into Instr to check, this was great for me and works well. However, it required writing a…

Ramses505
- 3
- 2
0
votes
1 answer
How would one relay (pass) a paramarray argument received by one function onto a second function in vba?
In VBA, there are times when you might want to pass an indeterminant number of arguments onto a function. In the VB world, paramarray handles such. But what if one needs, in turn to pass such onto a sub-function?
In the challenge here, I have a…

Eric Hofer
- 65
- 7
0
votes
2 answers
Nesting ParamArrays when declaring Excel VBA functions like SUMIFS?
Consider the following example: Lets say you want to make a function "JoinIfs" that works just like SUMIFS except instead of adding the values in the SumRange, it concatenates the values in "JoinRange". Is there a way to nest the ParamArray as it…

LanceDango
- 23
- 1
- 7
0
votes
0 answers
Pass array as List to ParamArray
I want to pass values from an array to a function with a ParamArray in the same way as if I had passed each value from the array seperately.
Simplified example to further explain my question:
Sub DoSomething()
Dim MyArray(3) As Variant
…

GuidoT
- 280
- 1
- 12
0
votes
2 answers
Missing ParamArray in a UDF
I'm trying to determine when a user defined function (UDF) using a ParamArray has been used on the worksheet with no ParamArray parameter(s) supplied.
I've tried the IsEmpty, IsArray, IsError, comparing to nothing, comparing to a zero-length string,…
user4039065
0
votes
3 answers
How to pass a dynamic number of elements to a Method which accepts a ParamArray
I have a method which I need to call which accepts a ParamArray
Method(ByVal ParamArray elements() As Object)
I need to pass it two known strings, and an unknown number of strings, based on a variable number of XmlNodes in an…

Shevek
- 3,869
- 5
- 43
- 63
0
votes
1 answer
Mysql Insert if the Specific Column is not available for the same Employee
I have a controller to save a record
My Table contains BELOW Fields
This is Must (It has to repeat in LOOP).
I want to insert a record single time in a table for a Employee Id, and it should not repeat again. But Same Employee can have multiple…

Sai Nag
- 1
- 3
0
votes
2 answers
Pass a Method from List to Delegate?
I am studying C# from the Web and while practicing parameter arrays as argument and delegates and playing around I came up with a piece of code that is a dead end or I don't know how to.
(I am not trying to write anything nor is it for something, I…

Erkan
- 1
- 3
0
votes
1 answer
Is it possible to execute a korn shell script passing an array as parameters?
I'm trying to execute a korn shell script using an array, but I would like to see if this is possible, I don't want to do is the follow example:
Script="/home/Myscript.sh"
. ${Script} "Value1" "Value2" "Value3"
Would be better if I can do something…

Javier Salas
- 1,064
- 5
- 15
- 38
0
votes
0 answers
Differentiating between a ParamArray and other arrays
Is there a way to differentiate a ParamArray from other types of arrays? Right now I'm using TypeName = "Variant()" and LBound = UBound (only one element) to check, but obviously it doesn't work on variant arrays with a single element.

Hao Zhang
- 147
- 9
0
votes
4 answers
How to implement a function that takes a param array (variable number of args) of generic args
I have seen a question here where they implemented a generic dispose method that takes any IDisposable object and calls dispose on it. I would like to make this such that it can take variable number of args. However, I do want to restrict the args…

DevByDefault
- 664
- 10
- 24
0
votes
2 answers
How to limit ParamArray Bounds In VB.NET?
I was working on a function that accepts ParamArrays. But it should have at least one element and the maximum of 5 elements. I tried defining array bounds but got an error Array bounds cannot appear in type specifiers.
So how can I do this?

hmak.me
- 3,770
- 1
- 20
- 33
0
votes
1 answer
Confusing ParamArray behavior - are repeated arrays somehow linked?
Sorry if the title and question are not clear; I don't have a good way to describe it. But here it goes:
So what is happening is that "testMat"s are somehow linked together, and it makes the values change even though I'm not redefining them. E.g.,…

Esteban
- 179
- 8
0
votes
1 answer
Use formula as a string
I one cell I have to use several different formula depending on certains case.
I another sheet named Static, I wrote a Matrix of formulas in TEXT for all the cases.
My matrix have Criteria1 in rows Criteria2 in columns
So with INDEX/MATCH i will…