Display detailed data in a pop up box
John
You should qualify the cell otherwise any other cell clicked on will pop up the
message box with "OK"
Would get kind of annoying.
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Address = "$E$5" Then
MsgBox _
ActiveCell.Offset(0, 15) & vbCrLf & ActiveCell.Offset(0, 16) & vbCrLf & _
ActiveCell.Offset(0, 17) & vbCrLf & ActiveCell.Offset(0, 18)
End If
End Sub
Gord Dibben MS Excel MVP
On Tue, 2 Jan 2007 14:21:40 -0600, "John Bundy"
wrote:
See if this does what you want
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
MsgBox _
ActiveCell.Offset(0, 15) & vbCrLf & ActiveCell.Offset(0, 16) & vbCrLf &
ActiveCell.Offset(0, 17) & vbCrLf & ActiveCell.Offset(0, 18)
End Sub
--
|