LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 90
Default worksheet change question

I want to be able to enter a time, using "." instead of ":", so that
when I enter the number, then press "Enter", the number changes from,
say, 13.27.33 to 13:27:33. But I am having to reselect the cell to get
it to change. What is wrong with my code?

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Selection.Replace What:=".", Replacement:=":", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False,
_
ReplaceFormat:=False
Selection.NumberFormat = "h:mm:ss"
End Sub

Thanks,

Tonso
 
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
Quick VBA Worksheet Change Event or Selection Question: Damil4real Excel Worksheet Functions 6 November 17th 09 10:28 PM
change formula in a shared worksheet without losing change history DCE Excel Worksheet Functions 5 July 25th 08 01:37 PM
Hyperlink Question -- Change in Worksheet Name? BG Excel Worksheet Functions 1 March 23rd 08 02:39 PM
Worksheet change Macro Question Vick Excel Discussion (Misc queries) 11 January 30th 08 03:09 PM
VLOOKUP change question roger_home Excel Discussion (Misc queries) 6 February 25th 06 11:06 PM


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