G
Guest
hi,
how can I write a code by which when only a cell like D11, is selected, a
msgbox pops up?
thanx
how can I write a code by which when only a cell like D11, is selected, a
msgbox pops up?
thanx
Mike said:Put this into a standard module
Sub exampleforstandardmodulecode()
If ActiveCell.Address <> Range("D11").Address Then Exit Sub
MsgBox "Cell D11 is selected"
End Sub
Put this into a Thisworkbook module
Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target
As Range)
Run "exampleforstandardmodulecode"
End Sub
Now for every sheet in workbook when D11 is selected your msgbox will pop up