Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Excel volatil functions questions


Hi,

If, for example, I have a function that is used in a report template
and that needs to do some processing on the date.

processDate(A1) where A1 contains the NOW() excel function.

I have to questions :
- I want the result of processDate() to be automatically recalculate
when the user press F9, is volatil the good way to do?

- When Excel refresh its data, will it refresh the NOW() cell before
the processDate cell because if not, the result of processDate could be
wrong?

Thanks

Nic


--
nicgendron
------------------------------------------------------------------------
nicgendron's Profile: http://www.excelforum.com/member.php...o&userid=25151
View this thread: http://www.excelforum.com/showthread...hreadid=396201

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,071
Default Excel volatil functions questions

With very few exceptions, Volatile is *never* the way to go. To me it
is simply a sign of an uninformed or a lazy programmer.

If A1 contains NOW() and somewhere else you have =ProcessDate(A1), XL
will process the cells in the correct sequence. It builds its own
'chains' of what cells need to be processed in what order.

As long as ProcessDate doesn't access elements of XL object model other
than the arguments, there is no need for it to be a volatile function.

--
Regards,

Tushar Mehta
www.tushar-mehta.com
Excel, PowerPoint, and VBA add-ins, tutorials
Custom MS Office productivity solutions

In article ,
says...

Hi,

If, for example, I have a function that is used in a report template
and that needs to do some processing on the date.

processDate(A1) where A1 contains the NOW() excel function.

I have to questions :
- I want the result of processDate() to be automatically recalculate
when the user press F9, is volatil the good way to do?

- When Excel refresh its data, will it refresh the NOW() cell before
the processDate cell because if not, the result of processDate could be
wrong?

Thanks

Nic


--
nicgendron
------------------------------------------------------------------------
nicgendron's Profile:
http://www.excelforum.com/member.php...o&userid=25151
View this thread: http://www.excelforum.com/showthread...hreadid=396201


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Excel volatil functions questions


Ok, but what should I do if I'm in the following situation :

I want to make a excel model file to generate report each day.
The report sheet uses my add-in and call the following function
"GetCurrVall"

At implementation level, this function uses a library to access
server and get some value.

In the report sheet, there is a lot of those calls.

My problem is :
When somebody opens the model to generate the report, he should refres
all the cells. If I don't put the volatile attribute in the function
the user has to manually refresh the cells that use "GetCurrVall". B
putting the volatile attribute, he just has to press F9 and that'
done.

My question is :
Is there another way to easyly refresh all the data given by my add-i
?

Ni

--
nicgendro
-----------------------------------------------------------------------
nicgendron's Profile: http://www.excelforum.com/member.php...fo&userid=2515
View this thread: http://www.excelforum.com/showthread.php?threadid=39620

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
Questions about functions Cory from Eugene[_2_] Excel Discussion (Misc queries) 11 August 31st 07 07:43 PM
Several function questions (nested functions) miller Excel Worksheet Functions 6 October 10th 05 05:58 AM
3 questions about automated c++ com add-in worksheet functions gert Excel Worksheet Functions 0 March 10th 05 09:57 AM
Array Functions - Two Questions MDW Excel Worksheet Functions 3 January 12th 05 06:54 PM
Making progress with array functions, another two questions Don Taylor Excel Programming 3 January 4th 05 08:30 PM


All times are GMT +1. The time now is 12:43 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"