Sub GhiDiaChiDaChonVoOB2()
[B2].Value = Selection.Address
End Sub
'Copy vào Code ThisWorkbook'
Private DTime As Date
Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target As Range)
CancelOnTime
Application.StatusBar = "Range: " & Target.Address(0, 0)
DTime = Now + TimeSerial(0, 0, 3)
Application.OnTime DTime, "'" & ThisWorkbook.Name & "'!" & ThisWorkbook.CodeName & ".DelStatus", , True
End Sub
Private Sub CancelOnTime()
On Error Resume Next
Application.OnTime DTime, "'" & ThisWorkbook.Name & "'!" & ThisWorkbook.CodeName & ".DelStatus", , False
End Sub
Private Sub DelStatus()
Application.StatusBar = ""
End Sub
Sao không thấy gì hở anh?Nếu chỉ nhìn để dể phân biệt thì nên hiện vùng chọn dưới thanh Status:
-----------------------------
PHP:'Copy vào Code ThisWorkbook' Private DTime As Date Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target As Range) CancelOnTime Application.StatusBar = "Range: " & Target.Address(0, 0) DTime = Now + TimeSerial(0, 0, 3) Application.OnTime DTime, "'" & ThisWorkbook.Name & "'!" & ThisWorkbook.CodeName & ".DelStatus", , True End Sub Private Sub CancelOnTime() On Error Resume Next Application.OnTime DTime, "'" & ThisWorkbook.Name & "'!" & ThisWorkbook.CodeName & ".DelStatus", , False End Sub Private Sub DelStatus() Application.StatusBar = "" End Sub