Thread: Function NOW
View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Gary''s Student Gary''s Student is offline
external usenet poster
 
Posts: 11,058
Default Function NOW


UDFs are very easy to install and use:

1. ALT-F11 brings up the VBE window
2. ALT-I
ALT-M opens a fresh module
3. paste the stuff in and close the VBE window

If you save the workbook, the UDF will be saved with it.

To use the UDF from the normal Excel window, just enter it like a normal
Excel Function

To remove the UDF:

1. bring up the VBE window as above
2. clear the code out
3. close the VBE window

To learn more about UDFs, see:

http://www.cpearson.com/excel/Writin...ionsInVBA.aspx

--
Gary''s Student - gsnu200856


"PeterW" wrote:

Thanks for the answer
Where can I define my own functions?

//Peter

"Gary''s Student" wrote:

1. first enter this tiny User Defined Function:

Function nnow() As Date
nnow = Now
End Function

2. Then In A1 enter 0

3. then, in another cell, say B9, enter:

=nnow()+a1 and format this cell as Custom mm/dd/yyyy hh:mm:ss

B9 will now display like NOW(), but only update when you change the value in
A1.


--
Gary''s Student - gsnu200856