Popup in excel

D

DianeandChipps

I added a message to show on screen when any of the cells in one column was
clicked on. I would like to do this again but can't remember how I did it.
Can anyone help? Many thanks
 
L

L. Howard Kittle

Hi D & C,

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
MsgBox "You selected cell " & ActiveCell.Address
End Sub

HTH
Regards,
Howard
 
B

Bob Phillips

.... and

'This is worksheet event code, which means that it needs to be
'placed in the appropriate worksheet code module, not a standard
'code module. To do this, right-click on the sheet tab, select
'the View Code option from the menu, and paste the code in.


--

HTH

RP
(remove nothere from the email address if mailing direct)
 
D

DianeandChipps

Thanks to both of you for your quick replies.
Unfortunately neither of your suggestions were familiar to me.
Maybe a bit more information will help.
If the office assistant is hidden the message looks like a comment, although
there is no red triangle in the corner of the cells.
If the office assistant is switched on the message is shown in its speech
bubble.

Thanks again.
Diane
 
B

Bob Phillips

First, get rid of the office assistant, life is richer without that annoying
'feature'

Then input the code L Howard provided using the instructions that I gave,
and selecting any cell will get you a message box popup.
--

HTH

RP
(remove nothere from the email address if mailing direct)
 
D

DianeandChipps

Thanks again, would this add a message into any cell on the worksheet or only
any cell in a certain column - which is what I did before.

Is there any way I can send the spreadsheet for you to see as I know there
is a more simple way to do this, I just can't remember!!
 
J

JulieD

The alternative to the guys' suggestion is to use data validation
1) select the column
2) choose data / validation
3) choose input message
4) ensure "show input message when cell is selected" is checked
5) type a title and your message
6) click OK

Cheers
JulieD
 
B

Bob Phillips

Indeed it can be targetted at one cell.

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
if target.address = "$H$10" Then
MsgBox "You selected cell " & ActiveCell.Address
End IF
End Sub


--

HTH

RP
(remove nothere from the email address if mailing direct)
 
D

DianeandChipps

Thank you JulieD, I think this is the most likely way I managed it. I won't
forget now.

Diane
 
Top