Klar geht das...
12.12.2002 17:23:01
L.Vira
Es muss ein Commandbutton as der Steuerelemente- Toolbox sein
In den Eigenschaften muss TakeFocusOnClick auf False eingestellt sein. Der Code gehört in das Modul der Tabelle:Option Explicit
Private Sub CommandButton1_MouseDown(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)
ActiveCell.Interior.ColorIndex = 5
End Sub
Private Sub CommandButton1_MouseUp(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)
ActiveCell.Interior.ColorIndex = xlNone
End Sub