Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
imr imr is offline
external usenet poster
 
Posts: 1
Default Help : Macro for capturing current system time

Hi,

I am currently working on an excel worksheet. It requires
macro button for capturing the system time at that particular moment i
certain columns. I would like to know how to solve this problem i
coding the macro for such a functionality. Please help me.

Regards
IM

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,080
Default Help : Macro for capturing current system time

Range("A1").Value = Time

Or am I missing something?

--

Vasant

"imr " wrote in message
...
Hi,

I am currently working on an excel worksheet. It requires a
macro button for capturing the system time at that particular moment in
certain columns. I would like to know how to solve this problem in
coding the macro for such a functionality. Please help me.

Regards
IMR


---
Message posted from http://www.ExcelForum.com/



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Help : Macro for capturing current system time

Hi Vasant,

Thanks for the solution, but it works for the particular cel
alone. It appears that i have to code for each cell.

Is there anyway to generalise the code, so that wherever i click on th
worksheet, the system time at that particular moment is updated and th
cell is also protected after this.

Please do let me know.

Regards
im

--
Message posted from http://www.ExcelForum.com

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,080
Default Help : Macro for capturing current system time

I'm a bit confused ... do you want this to happen for every cell on the
worksheet?

In any event there is no good way to capture a click on a worksheet. You can
capture a double-click or a right-click, for example:

Private Sub Worksheet_BeforeDoubleClick(ByVal _
Target As Range, Cancel As Boolean)
If Not Intersect(Target, Range("A:A")) Is Nothing Then
Cancel = True
Target = Time
End If
End Sub

Placing this code in the worksheet code module will cause any cell in column
A to be updated with the system time when double-clicked.

--

Vasant




"imr " wrote in message
...
Hi Vasant,

Thanks for the solution, but it works for the particular cell
alone. It appears that i have to code for each cell.

Is there anyway to generalise the code, so that wherever i click on the
worksheet, the system time at that particular moment is updated and the
cell is also protected after this.

Please do let me know.

Regards
imr


---
Message posted from http://www.ExcelForum.com/



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
Displaying the current system time - 2nd Try Zach Excel Worksheet Functions 3 July 17th 07 06:07 PM
macro for current time mangesh Excel Discussion (Misc queries) 0 March 21st 06 08:22 PM
How to write a macro to get the system time in excel 97 Raj Excel Discussion (Misc queries) 6 April 20th 05 07:20 PM
On Error, Capturing current module and actual line of code Paul Martin Excel Programming 4 June 13th 04 06:21 AM
excel - macro - automatic initiation of a macro at a pre-specified "system time" arunjoshi[_3_] Excel Programming 3 May 1st 04 09:42 AM


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