Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default VBA UDF Calculation (not)

To all,

I've got a UDF, but Excel will only calc it when the cell containing it is
edited, ie, F2, enter.

How can I force a calc? I tried 'Calculate' on the SheetActivate event, and
nothing happens...

TIA,

Greg


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,588
Default VBA UDF Calculation (not)

What are the inputs to the UDF? Does it use any data not passed as a parameter?

--
Tim Williams
Palo Alto, CA


"Greg Longtin" wrote in message ...
To all,

I've got a UDF, but Excel will only calc it when the cell containing it is
edited, ie, F2, enter.

How can I force a calc? I tried 'Calculate' on the SheetActivate event, and
nothing happens...

TIA,

Greg




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default VBA UDF Calculation (not)

Tim,

What are the inputs to the UDF? Does it use any data not passed as a
parameter?


One cell value, which is the name a worksheet in the workbook to use for the
calculation.

Greg


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default VBA UDF Calculation (not)

Greg,
Excel normally does not recalculate functions if their inputs have not
changed.
But may be application.Volatile will give the desired behaviour.

NickHK

"Greg Longtin" wrote in message
...
Tim,

What are the inputs to the UDF? Does it use any data not passed as a
parameter?


One cell value, which is the name a worksheet in the workbook to use for

the
calculation.

Greg




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default VBA UDF Calculation (not) solution

Tim,

Found a solution. Simply put, the udf find a date in other sheets, and it's
used in a summary sheet. I orginally set it up with one parameter, which
tells it what sheet to use. The workbook is a summary of our truck
maintanance (one sheet per), and the udf is used in the summary page.

Anyway, the summary sheet has a cell that uses TODAY() for revision date. I
added this as a parameter to the UDF, and although I'm not using it for
anything, it forces the recalc.

Thanks,

Greg


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
calculation msg box Ian82 Excel Discussion (Misc queries) 1 March 31st 10 01:26 PM
Multi threaded calculation (multi CPU) - impact on calculation spe Pascal[_2_] Excel Discussion (Misc queries) 1 December 3rd 08 10:46 AM
How do I use a rounded calculation result in another calculation? vnsrod2000 Excel Worksheet Functions 1 January 26th 05 10:11 PM
How do I use a rounded calculation result in another calculation? vnsrod2000 Excel Worksheet Functions 1 January 26th 05 09:36 PM
range.calculation with UDF not working when calculation is set to automatic Brian Murphy Excel Programming 5 October 14th 03 07:02 PM


All times are GMT +1. The time now is 10:46 PM.

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"