K
kevin carter
hi
i have a worksheet which contains a lot of data
what i want to do is to select a cell, when this cell is active i want
to show the value of the cell in a comment box
i have this macro to start with (called from sheet code)
Sub macro1()
Dim rng As Range
Dim cell As Range
Set rng = ActiveSheet.Range("c1:c3")
For Each cell In rng
If cell.Value <> "" Then
MsgBox " here"
Exit For
End If
Next
End Sub
Problem i have with that code is the whole sheet is active ( i click any
cell on the worksheet and the message box pops up)
where am i going wrong?
thanks in advance
kev
i have a worksheet which contains a lot of data
what i want to do is to select a cell, when this cell is active i want
to show the value of the cell in a comment box
i have this macro to start with (called from sheet code)
Sub macro1()
Dim rng As Range
Dim cell As Range
Set rng = ActiveSheet.Range("c1:c3")
For Each cell In rng
If cell.Value <> "" Then
MsgBox " here"
Exit For
End If
Next
End Sub
Problem i have with that code is the whole sheet is active ( i click any
cell on the worksheet and the message box pops up)
where am i going wrong?
thanks in advance
kev