Or simply you can use sendkeys
Sub Clear_Immediate_Window_Using_SendKeys()
    Dim x As Long

    For x = 1 To 10
        Debug.Print x
    Next x

    Debug.Print Now
    
    Debug.Print String(65535, vbCr)
    'OR
    'Application.SendKeys "^g ^a {DEL}"
End Sub