返回列表 上一主題 發帖

[發問] 輸入順序?

回復 8# s7659109


Private Sub Worksheet_Change(ByVal Target As Range)
With Target
     If .Count > 1 Or .Row = 1 Then Exit Sub
     If .Column = 5 Then
        If .Value = "" Then .Cells(1, -3).Resize(1, 6).ClearContents: Exit Sub
        .Cells(1, -3) = Format(Date, "emmdd")
        .Cells(1, -2) = 123
        .Cells(1, -1) = 345
        .Cells(1, 2).Select
     ElseIf .Column = 6 Then
        If .Value <> "" Then .Cells(2, 0).Select
     End If
End With
End Sub

TOP

謝謝准大,提供另一個思路!
希望支持!

TOP

        靜思自在 : 發脾氣是短暫的發瘋。
返回列表 上一主題