user defined function

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
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
 
Maybe you should describe what that message says.

Better yet, type in exactly the message you see.
 
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
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top