Gruppe
Allgemein
Problem
Wie kann ich auf Schaltflächenbetätigung die Funktionen aller Funktionstasten aus- und wieder einschalten?
StandardModule: basMain
Sub cmdStart()
With ActiveSheet.Buttons(1)
If .Caption = "Funktionstasten aus" Then
Call TastenBelegungNeu
.Caption = "Funktionstasten ein"
Else
Call TastenBelegungAus
.Caption = "Funktionstasten aus"
End If
End With
End Sub
Sub TastenBelegungNeu()
Dim iCounter As Integer
For iCounter = 1 To 12
Application.OnKey "{F" & iCounter & "}", ""
Next iCounter
Application.OnKey "{tab}", "Eingabe"
End Sub
Sub TastenBelegungAus()
Dim iCounter As Integer
For iCounter = 1 To 12
Application.OnKey "{F" & iCounter & "}"
Next iCounter
Application.OnKey "{tab}"
End Sub
Sub Eingabe()
Application.SendKeys "{enter}"
End Sub