hyperlink macro
Hi Choice,
Try:
'=============
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim rng As Range
Set rng = Me.Range("A1:A10") '<<==== CHANGE
If Not Intersect(rng, Target) Is Nothing Then
With Target
MsgBox "The value of " & .Address(0, 0) _
& " = " & Target.Offset(0, 1).Value
End With
End If
End Sub
'<<=============
This is worksheet event code and should be pasted into the worksheets's code
module (not a standard module and not the workbook's ThisWorkbook module):
Right-click the worksheet's tab
Select 'View Code' from the menu and paste the code.
Alt-F11 to return to Excel.
---
Regards,
Norman
"choice" wrote in message
...
is there a way to have it when i click on cell A1 it will have a message
box
of value in b1. if i click on a2, message box of b2...etc
thanks in advance
|