Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,670
Default Insert Date and time in Cell

Hello,

I am looking for a line of code that I could add to the end of my macro that
would insert the date and time the macro was first run into a cell named
"vLeadWriteDate". Any help would be great.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default Insert Date and time in Cell

vLeadWriteDate = now

Be sure the column is wide enough or you will see ########.

"Eric" wrote:

Hello,

I am looking for a line of code that I could add to the end of my macro that
would insert the date and time the macro was first run into a cell named
"vLeadWriteDate". Any help would be great.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default Insert Date and time in Cell

If you only want the first occurance, then

If vLeadWriteDate "" The
'Do nothing
Else
vLeadWriteDate = now
End If

"Eric" wrote:

Hello,

I am looking for a line of code that I could add to the end of my macro that
would insert the date and time the macro was first run into a cell named
"vLeadWriteDate". Any help would be great.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default Insert Date and time in Cell

I'll get this right pretty soon. This should do it:

If Range("vLeadWriteDate") "" The
'Do nothing
Else
Range("vLeadWriteDate") = now
End If



"JLGWhiz" wrote:

If you only want the first occurance, then

If vLeadWriteDate "" The
'Do nothing
Else
vLeadWriteDate = now
End If

"Eric" wrote:

Hello,

I am looking for a line of code that I could add to the end of my macro that
would insert the date and time the macro was first run into a cell named
"vLeadWriteDate". Any help would be great.

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
Auto insert Date & Time when another cell is populated Trixie Excel Discussion (Misc queries) 1 October 2nd 06 03:59 AM
Auto insert date/time Tino Excel Worksheet Functions 1 September 8th 06 05:58 PM
insert date and time picker Vernon Green Setting up and Configuration of Excel 3 May 2nd 06 02:49 AM
how do I insert the current time (static) and date in a cell? DF Excel Discussion (Misc queries) 5 October 28th 05 05:54 PM
Auto date/time insert when data entered into an adjacent cell Auto date/time Excel Worksheet Functions 1 July 9th 05 12:10 AM


All times are GMT +1. The time now is 02:02 AM.

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"