Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Recalculate Custom Function

I created a custom function in VBA but when I use it in a cell it doesn't
recalculate unless I edit the cell. I have Excel set for automatic
calcualtion. It doesn't recalculate when I press F9. What am I doing
wrong?

Thanks

--
Brad


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default Recalculate Custom Function

Hi Brad,

If you want to force recalcualtion of function every time Excel
calculates, add the following line just after the custom function name:

Public Function blabla(...)
application.volatile '<<<<<< to be added

HTH

@+
FxM





Brad L. a écrit :

I created a custom function in VBA but when I use it in a cell it doesn't
recalculate unless I edit the cell. I have Excel set for automatic
calcualtion. It doesn't recalculate when I press F9. What am I doing
wrong?

Thanks

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Recalculate Custom Function

Hi
you may add the cell references in your custom function as parameter.
Another option would be to add
application.volatile
at the beginning of your code.

You may post your user defined function (IMHO the first option is the
better one)


--
Regards
Frank Kabel
Frankfurt, Germany


Brad L. wrote:
I created a custom function in VBA but when I use it in a cell it
doesn't recalculate unless I edit the cell. I have Excel set for
automatic calcualtion. It doesn't recalculate when I press F9. What
am I doing wrong?

Thanks


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Recalculate Custom Function

Thanks, that did the trick.

--
Brad
"FxM" wrote in message
...
Hi Brad,

If you want to force recalcualtion of function every time Excel
calculates, add the following line just after the custom function name:

Public Function blabla(...)
application.volatile '<<<<<< to be added

HTH

@+
FxM





Brad L. a écrit :

I created a custom function in VBA but when I use it in a cell it

doesn't
recalculate unless I edit the cell. I have Excel set for automatic
calcualtion. It doesn't recalculate when I press F9. What am I doing
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
Ned Help W/ Custom Function japorms Excel Worksheet Functions 3 August 14th 06 09:58 PM
Refresh/Recalculate a Custom Function dch3 Excel Worksheet Functions 1 July 31st 06 01:59 PM
Emulate Index/Match combo function w/ VBA custom function Spencer Hutton Excel Worksheet Functions 2 May 2nd 05 05:26 PM
function does not recalculate sum lukiedukie Excel Worksheet Functions 1 April 22nd 05 10:20 PM
Adding a custom function to the default excel function list DonutDel Excel Programming 3 November 21st 03 03:41 PM


All times are GMT +1. The time now is 08:43 AM.

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

About Us

"It's about Microsoft Excel"