View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
Syed Zeeshan Haider[_5_] Syed Zeeshan Haider[_5_] is offline
external usenet poster
 
Posts: 19
Default Updating a Function's Result

Thank you for the information!

Your idea is very wise but I have to make my functions, fully automatic and
independent like NOW() is. Such functions could be distributed to others who
need them without any deep knowledge of VBA or such expertise of Excel like
you have.

Thank again!
--
Syed Zeeshan Haider.
http://szh.20m.com/


-----------------------------------
Allah says to Mankind:
"Then which of the favours of your Lord will ye deny?"


"RADO" wrote in message ...
somewhere in your spreadsheet, have a cell with the current date, i.e, a
cell "$A$1" with the formula '=Today()' or Now(). Then include a new
parameter into your function, i.e., CurrentDate as Date, and when you use
your function, use the cell with the date as a source for CurrentDate.

Your
function use will look like this:

=myfunction(.....whatever other parameters you have already..., $A$1)

Every time you open your workbook, Today (or Now) will recalculate cell
$A$1, and this will force Excel to recalculate your function.

Cheers,

RADO


"Syed Zeeshan Haider" wrote in
message ...
Hello Experts,
I have Excel 97 Pro on Win98SE.

I have written a custom function which depends on date, therefore, its
result must be refreshed every time the workbook is opened; like NOW
function does.
How can I give my function the ability to update its results

automatically?

Thank you,
--
Syed Zeeshan Haider.
http://szh.20m.com/


-----------------------------------
Allah says to Mankind:
"Then which of the favours of your Lord will ye deny?"