![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: May 2002
Posts: 10
|
Is it possible to have a Msg Box popped up by just selecting a cell? That is, can Excel be so programmed that as I select cell A1, a Msg Box pops up with a message?
|
|
|
|
|
|
#2 |
|
Board Regular
Join Date: Mar 2002
Location: Sydney/Brisbane , Australia
Posts: 539
|
What is the reason for you wanting the message box to cokme up when they click a cell?
you may find the users in here can give you a better solution if you tell us why you want to do it this difficult way? |
|
|
|
|
|
#3 |
|
Board Regular
Join Date: Mar 2002
Posts: 363
|
Right click on the sheet tab. Click View Code. This will launch the VBA editor with the following:
Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range) End Sub add the following code after the first line: If ActiveCell.Address = "$A$1" Then MsgBox "Your message here" End If
__________________
It's never too late to learn something new. Ricky |
|
|
|
|
|
#4 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Columbus, OH, USA
Posts: 3,519
|
Yeah, right click on the name tab of the sheet that you want the messagebox to appear on when "A1" is selected, choose "View Code" and stick in this code:
As for getting the messagebox to appear right next to the cell, that isn't going to happen. A comment is probably going to be your best bet. (there's another text box thingy, but I can't remember how to insert that) |
|
|
|
|
|
#5 |
|
New Member
Join Date: May 2002
Posts: 10
|
Thanks guys....this worked beautifully.
|
|
|
|
|
|
#6 |
|
MrExcel MVP
Join Date: Apr 2002
Location: Vancouver BC , Canada
Posts: 6,259
|
If you don't want to get into coding you can also get a pop-up input message by using the "Data"..."validation"..."input message" option from the tool bar.
|
|
|
|
|
|
#7 |
|
Board Regular
Join Date: Feb 2002
Location: Huntington Beach, CA USA
Posts: 327
|
Hey cruzzin, "cruzzinn for a bruzzin"
easy on the freudian slip, cokme? as i figured! James |
|
|
|
|
|
#8 |
|
Board Regular
Join Date: Mar 2002
Location: Sydney/Brisbane , Australia
Posts: 539
|
huh?
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|