Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
UB UB is offline
external usenet poster
 
Posts: 120
Default user defined function

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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,574
Default user defined function

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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
UB UB is offline
external usenet poster
 
Posts: 120
Default user defined function

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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,574
Default user defined function

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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 35,218
Default user defined function

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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
UB UB is offline
external usenet poster
 
Posts: 120
Default user defined function

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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,574
Default user defined function

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
User Defined Function Barb Reinhardt Excel Worksheet Functions 3 March 28th 07 02:23 AM
user defined function driller Excel Worksheet Functions 1 November 18th 06 04:51 PM
User Defined Function Samad Excel Discussion (Misc queries) 14 November 16th 05 12:32 PM
user defined function Brian Rogge Excel Worksheet Functions 5 May 23rd 05 06:21 PM
User-defined function PierreL Excel Worksheet Functions 4 December 23rd 04 09:16 AM


All times are GMT +1. The time now is 01:45 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"