View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Abhijeet Gudur Abhijeet Gudur is offline
external usenet poster
 
Posts: 20
Default Macro converts time entered in column E and F from Indian time to CST( without daylight saving)

Private Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False
On Error GoTo Error_out:
Dim mrange As Range
Set mrange = Range("E:F")
If Not Intersect(Target, mrange) Is Nothing Then
Target = Target - TimeValue("13:30")
End If
Application.EnableEvents = True
'MsgBox ("Check Day-Light-Saving") optional
Exit Sub
Error_out:
Application.EnableEvents = True
End Sub