½Ð°Ý³oÓWorkbookþ¸Ì¦³¿ù»~©O¡H
- ©«¤l
- 162
- ¥DÃD
- 33
- ºëµØ
- 0
- ¿n¤À
- 243
- ÂI¦W
- 0
- §@·~¨t²Î
- win7
- ³nÅ骩¥»
- excel 2003
- ¾\ŪÅv
- 20
- µù¥U®É¶¡
- 2018-1-5
- ³Ì«áµn¿ý
- 2024-10-22
|
½Ð°Ý³oÓWorkbookþ¸Ì¦³¿ù»~©O¡H
¥»©«³Ì«á¥Ñ coafort ©ó 2023-7-20 13:10 ½s¿è
½Ð°Ý¦U¦ì¤j¤j
Workbook³o¼Ë·|¥X¿ù
½sĶ¥X¿ù µo²{¤£½T©wªº¦WºÙWorkbook_SheetChange
½Ð°Ý¬Oþ¸Ìªº°ÝÃD©O
ÁÂÁÂ
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
With Target
If .Worksheet.Index = 1 Then Exit Sub
If .Worksheet.Index > 3 Then Exit Sub
If .Column = 41 Then
If .Count > 1 Then Exit Sub
If .Value = "" Then .Offset(, 1).ClearContents
End If
If .Column = 27 Then
If .Count > 1 Then Exit Sub
If .Value = "" Then .Offset(, 1).ClearContents
End If
If .Column = 1 Then
If .Count > 1 Then Exit Sub
If .Value = "" Then .Offset(, 1).ClearContents
End If
If .Column = 16 Then
If .Row < 3 Then Exit Sub
If .Row > 40 Then Exit Sub
If .Row >= 24 And .Row <= 26 Then Exit Sub
If .Count > 1 Then Exit Sub
If .Value = "" Then .Offset(, 1).ClearContents
End If
If .Column = 20 Then
If .Row < 3 Then Exit Sub
If .Row > 40 Then Exit Sub
If .Row >= 24 And .Row <= 26 Then Exit Sub
If .Count > 1 Then Exit Sub
If .Value = "" Then .Offset(, 1).ClearContents
End If
End With
End Sub
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
With Target
If .Worksheet.Index > 4 Then Exit Sub
If .Worksheet.Index > 8 Then Exit Sub
If .Column = 45 Then
If .Count > 1 Then Exit Sub
If .Value = "" Then .Offset(, 1).ClearContents
End If
If .Column = 30 Then
If .Count > 1 Then Exit Sub
If .Value = "" Then .Offset(, 1).ClearContents
End If
If .Column = 1 Then
If .Count > 1 Then Exit Sub
If .Value = "" Then .Offset(, 1).ClearContents
End If
If .Column = 17 Then
If .Row < 3 Then Exit Sub
If .Row > 40 Then Exit Sub
If .Row >= 24 And .Row <= 26 Then Exit Sub
If .Count > 1 Then Exit Sub
If .Value = "" Then .Offset(, 1).ClearContents
End If
If .Column = 22 Then
If .Row < 3 Then Exit Sub
If .Row > 40 Then Exit Sub
If .Row >= 24 And .Row <= 26 Then Exit Sub
If .Count > 1 Then Exit Sub
If .Value = "" Then .Offset(, 1).ClearContents
End If
End With
End Sub |
|
|
|
|
|
|