Macro doesnt running Excel 2007 second parameter
I create a Public vba function with 2 parameters(module). When I ca开发者_开发知识库ll the function I type "=InvoiceAmount2(A9;B9)". The first parameter turns blue. The second black. I remake the same function using one parameter, the second I use into the function, that way it´s ok. But I need two parameters
This is how you call a user defined function with two parameters:
=MyFunction(A1,B1)
Sample Code:
Function MyFunction(rCellA As Range, rCellB As Range)
MyFunction = rCellA.Value + rCellB.Value
End Function
I found the problem.
I call the udf function in formula constructor. I informed the parameters (A9 and B9) finally, the udf function filled the cell. "=InvoiceAmount2(A9;B9)".
精彩评论