工作表模組:
Option Explicit
Private Sub Worksheet_Change(ByVal Target As Range)
Dim N%
With Target
If .Column = 1 And .Rows.Count = 1 Then
N = Application.CountIf([A:A], "列印")
If N > 1 Then MsgBox "A欄有 " & N & " 個列印": Exit Sub
If N = 1 Then
Sheets(2).Activate
'~~轉至(sheet2)頁面指定欄位
End If
End If
End With
End Sub作者: lky12345 時間: 2024-1-4 18:24