Вход на сайт
Tabellenkalkulation в OpenOffice
208 просмотров
Перейти к просмотру всей ветки
в ответ Wladimir- 01.06.10 22:37
Скрипт для первой ячейки (ексель):
Private Sub Worksheet_Change(ByVal Target As Range)
Dim clear As Boolean
If Target.Count = 1 Then
If Target.Column = 1 And Target.Row = 1 Then
clear = True
If IsNumeric(Target.Cells(1, 1).Value) Then
If Target.Cells(1, 1).Value > 9 Then
Target.Cells(1, 1).Value = 10
clear = False
End If
End If
If clear Then
Target.Cells(1, 1).Value = ""
End If
End If
End If
End Sub
Private Sub Worksheet_Change(ByVal Target As Range)
Dim clear As Boolean
If Target.Count = 1 Then
If Target.Column = 1 And Target.Row = 1 Then
clear = True
If IsNumeric(Target.Cells(1, 1).Value) Then
If Target.Cells(1, 1).Value > 9 Then
Target.Cells(1, 1).Value = 10
clear = False
End If
End If
If clear Then
Target.Cells(1, 1).Value = ""
End If
End If
End If
End Sub