user defined function

U

ub

I have written a function in module1 ,
whenever I do change change in the code of the fuction and try to run, it
gives me a message to create a macro.
Please advise where I am going wrong.
Thanks
 
U

ub

Here's the function
Function sumvisible(rng As Range)


Application.Volatile


Dim myTotal As Double
Dim myCell As Range

Application.Volatile

myTotal = 0
For Each myCell In rng.Cells
If Application.IsNumber(myCell.Value) Then
If myCell.EntireRow.Hidden = False _
And myCell.EntireColumn.Hidden = False Then
myTotal = myTotal + myCell.Value
End If
End If
Next myCell


sumvisible = myTotal


End Function
 
D

Dave Peterson

Maybe you should describe what that message says.

Better yet, type in exactly the message you see.
 
U

ub

Hi, there is no problem with the UDF
But suppose I make any modification to this UDF and then try to run this
udf, system prompts me with macro window to create a macro.
please try this on yr system
 
D

Dave F

Same thing happens: the UDF works, unless I intentionally break it. But at
no time am I asked to record a new macro.

Do you have any other macros running in the background? Such as in your
personal.xls file?

Dave
 
Top