Time #2

I need to be able to click on a cell and have it be populated with the 
current HH:MM:SS.  I know ctrl+shift+; will do the job but I need it to be 
even more simple than that for the end users.  
0
Tom7430 (437)
11/18/2008 4:40:20 PM
excel.newusers 15348 articles. 2 followers. Follow

1 Replies
772 Views

Similar Articles

[PageSpeed] 3

One way:

Put this in the worksheet code module (right-click the worksheet tab and 
choose View Code):

    Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
        With Range("J1")
            If Not Intersect(Target, .Cells) Is Nothing Then
                .Value = Time
                .NumberFormat = "HH:MM:SS"
            End If
        End With
    End Sub

or, if you only want it to update once:


    Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
        With Range("J1")
            If Not Intersect(Target, .Cells) Is Nothing Then
                If IsEmpty(.Value) Then
                    .Value = Time
                    .NumberFormat = "HH:MM:SS"
                End If
            End If
        End With
    End Sub

Note that this will also fire if the user presses an arrow key to enter 
the cell. If you'd rather, you can use a double-click:


    Private Sub Worksheet_BeforeDoubleClick( _
            ByVal Target As Excel.Range, Cancel As Boolean)
        With Range("J1")
            If Not Intersect(Target, .Cells) Is Nothing Then
                If IsEmpty(.Value) Then
                    .Value = Time
                    .NumberFormat = "HH:MM:SS"
                    Cancel = True
                End If
            End If
        End With
    End Sub



In article <AB88CB3F-6674-490F-8B7F-951C83BF7E71@microsoft.com>,
 Tom <Tom@discussions.microsoft.com> wrote:

> I need to be able to click on a cell and have it be populated with the 
> current HH:MM:SS.  I know ctrl+shift+; will do the job but I need it to be 
> even more simple than that for the end users.
0
jemcgimpsey (6723)
11/18/2008 5:41:32 PM
Reply:

Similar Artilces:

routing issue #2
we have two routers, one is attached to an ISA server which is used mainly for the internet one is attached to the exchange server which is used solely for email the exchange server is sending mail throo the ISA router server - how can i make it use the exchange router ? - the IP of the ISA router is showing in the email headers mark Hi, I presume the default gateway of the Exchange server is the ISA router? Therefore it will always route through it. This is all theory, as I haven't got the time to test it at the moment: Add another IP to your Exchange server, which DFG is the r...

=?iso-8859-1?Q?=22microsoft_office_document_imaging=22_documents=3F?= #2
Is there a program available for Mac that can read "microsoft office document imaging" documents? I have a number of email attachements sent to me with "filename.mdi" that I need to open Can they be opened on a Mac running OS X? ...

Time out OWA
i have a problem with owa, when i connect it does not happen but of 2 minutes and it gives to Time out me, "expired conecction", i have nt 4.0 and exchange server 5.5 sp4, i check options and everything is normal salu2 Ruben R. "Ruben Rozas" <pipen@uplink.cl> wrote in news:003c01c3c59a$13b80b90 $a601280a@phx.gbl: > i have a problem with owa, when i connect it does not > happen but of 2 minutes and it gives to Time out > me, "expired conecction", i have nt 4.0 and exchange > server 5.5 sp4, Has it ever worked correctly? Is the OWA serve...

Date format problem #2
Dear All, Please suggest me the solution of my problem, as i m handling data for 60,000 in no.Some body in data entry has enter the date in a cell in gernal format e.g 20.03.2003 tht is 20th march 2003, i wnt to convert in the date fomat,like 3/20/03.. i tried ..but i failed to tht please suggest some alternative solution for tht..becoz it is not possible to do it mannually waiting for the response Thanks NISHANT Nishant Try using Data/Text to Columns. and assign the information as a date. Andy. "Nishant" <nishant.khare@wipro.com> wrote in message news:090201c37ce0$1b...

Pivot table sorting #2
Hello, I have a pivot table report for partnumber and values. This report is based on a database containing details like partnumber source import flag Description total value... etc. In my report i would like to sort the table in descending order of total value. I have tried advanced option by double clicking the total value field and changing the autosorting option to descending(total). But i am not getting the required result. My version of excel is Microsoft office excel 2003. Pivot table report is given below Source (All) Imp (All) Sub (All) Description (All) ...

convert time into decimal #2
=IF(E44="","X",E40-E44) the formula above where E40 is the time now, and E44 is the time of 2 hours ago. I want to return 2 instead of 2:00 PM. How do I do this? I do this but it does not work (E40-E44)*24. ...

comapring 2 seperate workbook
HELP!!! Is there any way you can compare 2 workbooks. for example, would be looking for a match (of values) from single columb o workbook 'a' to values of single columb from workbook 'b'. When eve there is a match between these two, maybe I can write it on ne workbook?(automatically). Or if there is any other tricks, please le me know. (I am sick of comparing it maually and when there is a match I am cutting and pasting to new workbook) -- Message posted from http://www.ExcelForum.com Hi as a starting point have a look at: http://www.cpearson.com/excel/duplicat.htm#Ex...

CRM 1.2 SBS 2003 Can not install exchange email router
Logged on as domain admin throughout. Installed CRM successfully, followed install instructions, did not install to local host installed web to a hostheader of "companyweb" port 80. during Exchange email router setup I get an error when specifying CRM server and web - "one or more os the MS CRM servers you listed is invalid or you do not have administrator priveleges on that server...." server name: sbssrb01 web http://companyweb If I go into IIS can not open CRM web get - http Error 403 - Forbidden: Access is denied. All services are on 1 server "sbssrv01&qu...

arrow keys #2
To move from cell to cell, I used my arrow and enter keys. They no longer work in Excel. I have to click on each cell to get there. Do you know how to fix it? Thanks. What happens when you use the arrow key? Check if your scroll lock is on or if you have something under tools>options>transition -- Regards, Peo Sjoblom "Shirley Smith" <anonymous@discussions.microsoft.com> wrote in message news:079201c3af8e$fa3acc00$a001280a@phx.gbl... > To move from cell to cell, I used my arrow and enter > keys. They no longer work in Excel. I have to click on > eac...

any one have a clue how to sync 2 copies of outlook
laptop and desktop I want to sync up the outlook on both. any clues/? hints? thanks Hi Paul, Have a look at www.slipstick.com/outlook/sync.htm or at my signature for a powerful tool. -- Thomas Wetzel www.synchpst.com Synchronize and backup Outlook ...

date/time stamp on user exit
I have a database that logs when a form (RPA) comes into our office. The RPA will go through a few different hands and will have different information entered into the database from each person. How do I get a log of when information is entered and by who? I am a beginner so a detailed explanation would be helpful. Thank you! On Wed, 27 Feb 2008 14:26:00 -0800, Kim <Kim@discussions.microsoft.com> wrote: >I have a database that logs when a form (RPA) comes into our office. The RPA >will go through a few different hands and will have different information >entered into the...

VBA syntax to indicate times/multiply operator after "Like"
Using XL 2003 & 97 In VBA code what is the correct syntax after "Like" (to indicate "wildcard before" + Multiply sign (Asterick) + "any number" + "wildcard after." The challenge is how to code the use of the Asterick 1) as a wild card; then 2) as an operator; then 3) as a wild card again Attempted: Like "*" & * & "#*" Thoughts? TIA Dennis From XL/VBA Help ("Like operator") > Note To match the special characters left bracket ([), question mark (?), > number sign (#), and asterisk (*), enclos...

Joining Win 7 to SBS 2003
I've joined a windows 7 professional 64 bit client to an SBS 2003 Premium server...it joined fine, as far as can be seen, except for 2 issues: - The User Account Control window pops up on each login showing, "Do you want to allow the following program to make changes to this computer" and the program is, "Windows Small Business Server 2003 with Service Pack 1" I've tried clicking "YES" several times and each reboot brings up the same question. - Offline files doesn't seem to be setup. I've had this issue before when joining computers...

Oulook & 2 exchanges (!)
Quick question I hope We have two sites, different domains, two Exchange servers, vpn connection between them (not set up yet)Is it possible to set up outlook so that it read mail from both domains? Use two profiles. --� Milly Staples [MVP - Outlook] Post all replies to the group to keep the discussion intact. All unsolicited mail sent to my personal account will be deleted without reading. After furious head scratching, Stormy asked: | Quick question I hope | We have two sites, different domains, two Exchange servers, vpn | connection between them (not set up yet)Is it possible to s...

Can I "wrap" date & time?
Is there a way that I can get date+time data to "wrap" -- that is, display the date (m/dd/yy) on the first line of the cell and the time (hh:mm ap) on the second line? Each row of the table is already two lines tall because of a comments field. I'd like to save horizontal space by breaking the date and time vertically. My table looks like this: B C D E Time Stamp Volume Weight Time Comments 4 9/25/08 500 ml 6.2 g 3:00 The comments often take 1:22 pm up two lines... 5 9/26/08 750...

CRM 1.2 Report Pack (Cannot attach sample database)
Hi, I have been trying to attach SRS sample database into SQL server but cannot succeed. The error message I have is: "The name you've specified is duplicate with another database which already exists. Please specify a different database name." For the "Adventure_Works_Cycle_MSCRM.mdf" file, I assume I can attach it no problem, because there is a check mark next to Current File(s) location field. However, I got the red cross mark for the "Adventure_Works_Cycle_MSCRM_log.LDF" file. If I keep hitting ok button to attach it, I will get t...

Flags and reminders #2
Good morning! First post - hope someone has the answer. I recieve reminders about my e-bills. I have set them to flag an remind me on a date selected - at a specific time. Is there a way to set a visual reminder for this, and is there a way t make it repeat. I don't really expect a yes answer - guess I have bee spoiled by my old Daytimer program. Thanks, Andrew in AL - Neo ----------------------------------------------- ~~ Message posted from http://www.ExcelTip.com ~~View and post usenet messages directly from http://www.ExcelForum.com What do you mean by visual reminder? Any remin...

Validation list question #2
I have created 2 validation lists in two different cells - D & E. Cell D contains the values 10A, 10B, and 10C. In cell E, the values are 1234, 1235, 1236. The cells are related in a sense that the first value in cell D goes with the first value in cell E, and so forth. My question is: when I select any of the values in D, how do I get the value to automatically input in E? Thanks in advance, Newtechie Hi newtechie assuming that you have your validations list in a separate range (lets say on a separate sheet called 'val_list') and they are ordered like the following A ...

Installing Report Manager 1.2
I can't install the report manager on my server, every time I go to load it stops immediately after i hit next to install the program and say it stopped pre maturely. i have tried gettting everyone out of the CRM, I have stopped IIS, im am out of ideas. Any help would be greatly appreciated. Regards, Hi try rebooting. Is your CRM web server using a different port number? Maybe that matters. Try restarting all the crystal services in crystal configuration manager too. Good luck. "Danb" <Danb@discussions.microsoft.com> wrote in message news:E4EA8B79-51D4-4B53-A5...

How to set time for processing the code?
Does anyone have any suggestions on how to set time for processing the code? I would like to add a condition that allow process the code before 4 pm, Does anyone have any suggestions on how to do it? Thanks in advance for any suggestions Eric If FileDateTime(PathFileName) > Date + TimeSerial(8, 0, 0) Or Now < TimeSerial(16, 0, 0) Then {It does not work!} hi i think the ontime method might do better. see this site for more details http://www.cpearson.com/excel/OnTime.aspx regards FSt1 "Eric" wrote: > Does anyone have any suggestions on how to set ...

Time and Numbers
I'm having a problem trying to figure out a formula that subtracts numbers from the time. In Cell G4 I have total Hours Cell A29 total square inches B29 has ? Price per square inch Cell C29 has ? Total Price How do I get my Price Per Sq. Inch based on $80.00 for every 3600 Sq. Inches based on Total Hours? Any help at all! Thanks in Advance. On May 3, 1:56=A0pm, Bob <bobandrich...@comcast.net> wrote: > I'm having a problem trying to figure out a formula that > subtracts numbers from the time. > In Cell G4 I have total Hours > Cell A29 total square inches > B29 has ...

Quote Template #2
In CRM 3 is it any way to create a quopte template or type of PreDefined quote for an specific product, so the user does not have to pic all part of the common quote all the time ? Thanks "Template" Quote is not available out of the Box. I would try looking into 3rd Party ISV in the Quote area or use SDK to create a "Template Quote" function - there are sample codes around that shows how to copy an existing Quote record. Good luck. Frank Lee, Microsoft Dynamics CRM MVP http://www.workopia.com/Links.htm http://microsoft-crm.spaces.live.com "Carlos" ...

Paper Size #2
I am developing a small company catalog that would use 11-1/2" x 17" paper. Is there a way to set this up on Publisher XP? Thank you, Michael Hi Michael (bronco@sprynet.com), in the Microsoft� newsgroups you posted: || I am developing a small company catalog that would use 11-1/2" x 17" || paper. Is there a way to set this up on Publisher XP? || || Thank you, || Michael As long as you have a printer driver setup that can handle that size paper, Microsoft Publisher will allow you to design on that size. You can go to File > Page Setup and go into your printer prop...

Updating macros #2
I have a template in which each worksheet is named, "Assignee 1", "Assignee 2", and so on. (8 total). When information is input into the sheets, they are renamed with the assignee's name. The macro on the template, however, is coded to reference "Assignee 1", "Assignee 2" and so on. I was wondering if there's a way to either: 1. Set up the macro to refresh along with the worksheet name changes in the workbook, or 2. Reference the sheets in the macro by their position, not by their names. Please help!! And thanks in advance to any...

RMS 2.0 Manuals
Are there user manuals in .pdf format for SO Administrator, Manager and POS? My client just purchased 8 v.2.0 licenses and would like to have the correct manuals. Everything on the MS website still seems to say v. 1.3. Was v.2.0 released in February 2007? Why haven't manuals been updated from 1.3? Thanks! This is a multi-part message in MIME format. ------=_NextPart_000_0060_01C93833.87F9C370 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Curious,=20 Look on the 2.0 CD or they can be ordered by your Partner for ~$25. --=20 Je...