Execute a macro that sets the Alt+F1 hotkey. Alt+F1 combination starts to be processed only after LO restart. Sub TestAccSetKey Dim oACC, keyEvent As New com.sun.star.awt.KeyEvent oACC=com.sun.star.ui.ModuleAcceleratorConfiguration.createWithModuleIdentifier("com.sun.star.sheet.SpreadsheetDocument") With keyEvent .KeyCode=com.sun.star.awt.Key.F1 .Modifiers=4 ' Alt End With oAcc.setKeyEvent KeyEvent, "vnd.sun.star.script:Standard.Module1.MyMacro?language=Basic&location=application" oAcc.store ' save End Sub