Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Couldn't tell you without seeing the code. Post it.
Dave -- A hint to posters: Specific, detailed questions are more likely to be answered than questions that provide no detail about your problem. "ub" wrote: 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 |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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 "Dave F" wrote: Couldn't tell you without seeing the code. Post it. Dave -- A hint to posters: Specific, detailed questions are more likely to be answered than questions that provide no detail about your problem. "ub" wrote: 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 |
#4
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
I just ran this UDF with no problem.
Dave -- A hint to posters: Specific, detailed questions are more likely to be answered than questions that provide no detail about your problem. "ub" wrote: 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 "Dave F" wrote: Couldn't tell you without seeing the code. Post it. Dave -- A hint to posters: Specific, detailed questions are more likely to be answered than questions that provide no detail about your problem. "ub" wrote: 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 |
#5
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Maybe you should describe what that message says.
Better yet, type in exactly the message you see. ub wrote: 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 -- Dave Peterson |
#6
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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 "Dave F" wrote: I just ran this UDF with no problem. Dave -- A hint to posters: Specific, detailed questions are more likely to be answered than questions that provide no detail about your problem. "ub" wrote: 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 "Dave F" wrote: Couldn't tell you without seeing the code. Post it. Dave -- A hint to posters: Specific, detailed questions are more likely to be answered than questions that provide no detail about your problem. "ub" wrote: 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 |
#7
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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 -- A hint to posters: Specific, detailed questions are more likely to be answered than questions that provide no detail about your problem. "ub" wrote: 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 "Dave F" wrote: I just ran this UDF with no problem. Dave -- A hint to posters: Specific, detailed questions are more likely to be answered than questions that provide no detail about your problem. "ub" wrote: 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 "Dave F" wrote: Couldn't tell you without seeing the code. Post it. Dave -- A hint to posters: Specific, detailed questions are more likely to be answered than questions that provide no detail about your problem. "ub" wrote: 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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
User Defined Function | Excel Worksheet Functions | |||
user defined function | Excel Worksheet Functions | |||
User Defined Function | Excel Discussion (Misc queries) | |||
user defined function | Excel Worksheet Functions | |||
User-defined function | Excel Worksheet Functions |