Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
arguments not working with function
Question from a Newbie Excel programmer,
I have a function that has arguments, for instance, Private Function myfunction(arg1 as Double, arg2 as Double, etc...) Dim anyvariable as Double anyvariable = arg1 - arg2 ..... End Function What is happening in the function I am working on is that when I add a breakpoint at the line "anyvariable = arg1 - arg2" and then inspect the values of the arguments "arg1" and "arg2", I discover that they have values of zero. (obviously, "anyvariable" also acquires a value of zero after the execution of that line of code.) However, in the spreadsheet the values in the cells referred to by the arguments are non-zero! Can anyone think of a reason why the arguments are not acquiring the values of the cells to which they point? The only thing I can think of is that the cells to which the arguments point do happen to contain values that are dependent on other VBA macros and that this could be creating a problem. Please help, Will |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Working with arrays as arguments | Excel Worksheet Functions | |||
Working with 2 arguments over 4 columns (countif ??) | Excel Worksheet Functions | |||
Disabling Function Results in the Function Arguments Window | Excel Programming | |||
customise Insert Function/Function Arguments dialog box | Excel Programming | |||
Need to open the Function Arguments window from VBA for a user defined function. | Excel Programming |