HI currently have this code in my sheet, and would like to incorporate the second code into the same sheet.

When I just put them together neither will work.

Just not sure how to do it


Code 1
Private Sub Worksheet_SelectionChange(ByVal Target As Range)

With thisworkbook.Names("ActiveRow")
.Name = "ActiveRow"
.RefersToR1C1 = "=" & ActiveCell.Row
End With

End Sub
Code 2
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    
    'another method is to have it show if a cell that is formatted as a date is selected...see below
    If Target.NumberFormat = "m/d/yy;@" Then
        CalendarFrm.Show
    End If
      
    'another method is using Select Case...see below
    Select Case Target.NumberFormat
        Case Is = "m/d/yy", "m/d/yyyy", "m/d/yy", "mm/dd/yy", "yyyy-mmm-dd", "dd-mmm-yy"
        CalendarFrm.Show
        'Case Else
        '    MsgBox "Not a valid date format!"
    End Select
End Sub