Private Sub Worksheet_Change(ByVal Target As Range)
n=1'修改n的值,第几列就是几
If Target.Column = n Then
MsgBox"当前指定列为第n列"
Else
Exit Sub
End If
End Sub
Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = 1 Then
【功能代码】
End If
End Sub