Thread: msgbox in VBA
View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
peyman peyman is offline
external usenet poster
 
Posts: 189
Default msgbox in VBA

thanks Mike.that's great.I have one more question.what's the difference
between "worksheet code module" and "standard code module"?what codes are
usually posted in "standard module"?
thank you again

"Mike" wrote:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If ActiveCell.Address < Range("D11").Address Then Exit Sub
MsgBox "Cell D11 is selected"
End Sub

"peyman" wrote:

hi,
how can I write a code by which when only a cell like D11, is selected, a
msgbox pops up?
thanx