Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Recalculation on cell changes fails when using VBA function

Folks,

I have found several threads on very similar issues but the suggestion
did not work for me.

I am using a VBA function in a spread sheet. However, when I change
value in the sheet, Excel does no recalculation for the VBA function
It does recalculate only the cells that contain Excel functions.

It doesn't even recalculate the VBA function after pressing ALT+CTRL+F
as I read in another thread.

Also, putting in the respective worksheet code
Private Sub Worksheet_Change(ByVal Target As Range)
Calculate
End Sub

did not help.
Same for application.volatile and application.calculate which
inserted as first line in the function's body or in main() or in th
above Private Sub.

Any ideas how I can get Excel to recalculate the function upon valu
changes in the spreadsheet??

Werne

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Recalculation on cell changes fails when using VBA function

Hi
you may post your macro :-)
But adding the line
application.volatile
should work

or adding the used cells as parameters for your function should also do
the trick


--
Regards
Frank Kabel
Frankfurt, Germany


Folks,

I have found several threads on very similar issues but the
suggestions did not work for me.

I am using a VBA function in a spread sheet. However, when I change a
value in the sheet, Excel does no recalculation for the VBA function.
It does recalculate only the cells that contain Excel functions.

It doesn't even recalculate the VBA function after pressing
ALT+CTRL+F9 as I read in another thread.

Also, putting in the respective worksheet code
Private Sub Worksheet_Change(ByVal Target As Range)
Calculate
End Sub

did not help.
Same for application.volatile and application.calculate which I
inserted as first line in the function's body or in main() or in the
above Private Sub.

Any ideas how I can get Excel to recalculate the function upon value
changes in the spreadsheet??

Werner


---
Message posted from http://www.ExcelForum.com/


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Recalculation on cell changes fails when using VBA function

Hi Frank,

indeed, when I tried it again this morning it worked.
I may add the function anyway later on, it is not on this PC. It simpl
does what I call "conditional sum", summing a column of number
depending on two criterias (rather than just one as in sumif).

Thanks for your help!

Greetings

Thoma

--
Message posted from http://www.ExcelForum.com

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
combination IF- and VLOOKUP-function fails Axel Excel Worksheet Functions 2 December 21st 09 03:46 PM
Avoiding Recalculation for a function in automatic mode Lokesh Sharma Excel Worksheet Functions 1 September 19th 06 04:52 AM
weird recalculation of user defined function timspier Excel Worksheet Functions 3 May 14th 06 05:39 AM
Function fails to calculate Dan Smith Excel Worksheet Functions 1 February 20th 06 05:57 AM
How to force a recalculation of values based on custom function Wim Bartsoen Excel Programming 1 October 28th 03 03:06 PM


All times are GMT +1. The time now is 09:43 PM.

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"