Re: Is it possible to have different pop up messages to appear
- From: Andy Pope <andy@xxxxxxxxxxxxx>
- Date: Sat, 13 Jan 2007 12:28:59 +0000
Try this John,
Right click on the *** tab and pick View code.
Paste code.
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Range("A1"), Target) Is Nothing Then
If Target.Value = 1 Then
MsgBox "Value " & Target.Value & _
" in A1 is correct", vbInformation
Else
MsgBox "Value " & Target.Value & _
" in A1 is incorrect", vbExclamation
End If
End If
End Sub
It checks that the change cell is A1. If so it checks the value is 1 and displays an appropriate message box.
Cheers
Andy
John Davies wrote:
Hi Andy.
Yes I could use conditional formatting to change text colour, therefore could you please show me what work*** event code I should use to show the different messages as I do not any experience of coding
Thanks John
"Andy Pope" wrote:
Hi,
You could use work*** event code to display a message box. But message boxes do not allow formatting of the message. For that you would need to use a userform.
Would the choice of red for correct not confuse the user? Red normally indicates a warning, bad or incorrect status.
Can you not use conditional formatting to change the cells pattern colour?
Cheers
Andy
John Davies wrote:
Is it possible to have different messages pop up, e.g. if cell a1 = 1, a message will pop p showing "Correct" with red bold text, if cell a1 = 2, message popus will show "Incorrect" with blue bold text etc.
Thanks in advance of any help.
John
- References:
- Re: Is it possible to have different pop up messages to appear
- From: Andy Pope
- Re: Is it possible to have different pop up messages to appear
- Prev by Date: Re: Addin Locking Excel
- Next by Date: Is it Possible to Deny Access except to specified
- Previous by thread: Re: Is it possible to have different pop up messages to appear
- Next by thread: Re: Is it possible to have different pop up messages to appear
- Index(es):