DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/index.php)
-   Visual Basic 4 / 5 / 6 (http://www.daniweb.com/forums/forum4.html)
-   -   Making Excel record a the time (http://www.daniweb.com/forums/thread34617.html)

grandfilth Oct 29th, 2005 7:14 am
Making Excel record a the time
 
I'd like excel to write the time when one of my macros tells it to copy and paste some cells into another workbook. I'd like it to paste the time into the other workbook. Any help would be much appreciated.

SlyMaelstrom Oct 29th, 2005 7:29 am
Re: Making Excel record a the time
 
http://msdn.microsoft.com/library/de...lywhenisit.asp

Try this.

If you're not up for reading it, the code would be:

Sub CopyWorksheet_Click()

Range("A1").FormulaR1C1 = Now

End Sub

grandfilth Oct 29th, 2005 7:38 am
Re: Making Excel record a the time
 
Quote:

Originally Posted by SlyMaelstrom
http://msdn.microsoft.com/library/de...lywhenisit.asp

Try this.

If you're not up for reading it, the code would be:

Sub CopyWorksheet_Click()

Range("A1").FormulaR1C1 = Now

End Sub

How do you make this work though? Sorry I'm a bit thick! How would I put this into a function so that a cell would read the time?

grandfilth Oct 29th, 2005 7:39 am
Re: Making Excel record a the time
 
sorry, didnt read the whole thing!
cheers man


All times are GMT -4. The time now is 11:35 pm.

Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC