make message box appear when cell is clicked?

T

Tacrier

Learning vba as I go, right now I am trying to get a message box to appear on
a user form I created for staff. This is what I have so far:

Sub showMessage()
MsgBox "Press Alt-Enter to insert a new line"
End Sub

What would the rest of this code be to have the message pop up when merged
cell AE8 is selected?

Thanks in advance :)

Trina
 
D

Don Guillett

Right click sheet tab>view code>insert this>DOUBLE click in e8:f8 to fire

Private Sub Worksheet_BeforeDoubleClick _
(ByVal Target As Range, Cancel As Boolean)
If Target.Address <> Range("e8:f8").Address Then Exit Sub
MsgBox "hi"

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top