Assign keyboard shortcut to run procedure

前端 未结 9 2073
没有蜡笔的小新
没有蜡笔的小新 2020-11-29 04:35

When I press F5 in the VBA editor I would always like to run my \"Sub Skynet()\" procedure. Is there any way to assign a keyboard shortcut to this procedure.

9条回答
  •  挽巷
    挽巷 (楼主)
    2020-11-29 05:06

    F5 is a standard shortcut to run a macro in VBA editor. I don't think you can add a shortcut key in editor itself. If you want to run the macro from excel, you can assign a shortcut from there.

    In excel press alt+F8 to open macro dialog box. select the macro for which you want to assign shortcut key and click options. there you can assign a shortcut to the macro.

提交回复
热议问题