Ctrl
05-16-2008, 06:22 AM
Hi everyone
This handy code was written by xld yesterday.
How can make (statusbar = False) if current row number is < 6 or > 60?
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
On Error Resume Next
If Me.Range("B" & Target.Row).Value = "" Then
Application.StatusBar = False
Else
Application.StatusBar = _
Me.Range("B" & Target.Row).Address(False, False) & ": " & Me.Range("B" & Target.Row).Value & ", " & _
Me.Range("BR" & Target.Row).Address(False, False) & ": " & Me.Range("BR" & Target.Row).Value & ", " & _
Me.Range("BS" & Target.Row).Address(False, False) & ": " & Me.Range("BS" & Target.Row).Value & ", " & _
Me.Range("BT" & Target.Row).Address(False, False) & ": " & Me.Range("BT" & Target.Row).Value
End If
End Sub
This handy code was written by xld yesterday.
How can make (statusbar = False) if current row number is < 6 or > 60?
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
On Error Resume Next
If Me.Range("B" & Target.Row).Value = "" Then
Application.StatusBar = False
Else
Application.StatusBar = _
Me.Range("B" & Target.Row).Address(False, False) & ": " & Me.Range("B" & Target.Row).Value & ", " & _
Me.Range("BR" & Target.Row).Address(False, False) & ": " & Me.Range("BR" & Target.Row).Value & ", " & _
Me.Range("BS" & Target.Row).Address(False, False) & ": " & Me.Range("BS" & Target.Row).Value & ", " & _
Me.Range("BT" & Target.Row).Address(False, False) & ": " & Me.Range("BT" & Target.Row).Value
End If
End Sub