返回列表 上一主題 發帖

[發問] 輸入順序?

本帖最後由 s7659109 於 2018-9-13 10:52 編輯

准大:可能沒說清楚,需求是

每輸入完一個儲存格,操作者,會按enter鍵
輸入順序
以第4列為例:b4 key完enter,a4帶入系統日期靠右,緊接著跳到c4,c4key完enter,跳到e4,key完enter跳到f4,key完跳下一列b5位置,以此循環

輸入順序1070913.zip (13.75 KB)

希望支持!

TOP

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

TOP

        靜思自在 : 慈悲沒有敵人,智慧不起煩惱。
返回列表 上一主題