Hello,
I have worked with a tracker for many years. This tracker has a time stamp macro and the keyboard shortcut has always been 'ctrl+t'.
If I open a version of the tracker that was last edited in Office 2010 it works fine but when using the version I have edited in Office 365, using 'ctrl+t' highlights an area rather than applying the time.
The VB behind it is;
Sub Now_Time()
'
' Now_Time Macro
'
' Keyboard Shortcut: Ctrl+t
'
If Not Intersect(ActiveCell, Range("B2:B100")) Is Nothing Then
ActiveCell.FormulaR1C1 = "TimeStamp"
Range("A6").Select
Selection.Copy
Cells.Find(What:="TimeStamp", After:=ActiveCell, LookIn:=xlFormulas, _
LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False).Activate
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Application.CutCopyMode = False
ActiveCell.Offset(0, 3).Activate
ElseIf Not Intersect(ActiveCell, Range("C2:C99")) Is Nothing Then
ActiveCell.FormulaR1C1 = "TimeStamp"
Range("A6").Select
Selection.Copy
Cells.Find(What:="TimeStamp", After:=ActiveCell, LookIn:=xlFormulas, _
LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False).Activate
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Application.CutCopyMode = False
ActiveCell.Offset(1, -1).Activate
ElseIf Not Intersect(ActiveCell, Range("C100:C100")) Is Nothing Then
ActiveCell.FormulaR1C1 = "TimeStamp"
Range("A6").Select
Selection.Copy
Cells.Find(What:="TimeStamp", After:=ActiveCell, LookIn:=xlFormulas, _
LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False).Activate
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Application.CutCopyMode = False
End If
End Sub
This is the "Timestamp" code;
Sub TimeStamp()
Selection.InsertDateTime DateTimeFormat:="h:mm:ss am/pm", InsertAsField:= _
False, DateLanguage:=wdEnglishUS, CalendarType:=wdCalendarWestern, _
InsertAsFullWidth:=False
Selection.TypeText Text:=vbTab
End Sub
I would like to know if there is anything I can do to continue using the 'ctrl+t' as the time stamp shortcut.
Bookmarks