Thread: Dailog Box Q
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Nigel Nigel is offline
external usenet poster
 
Posts: 923
Default Dailog Box Q

You can show a MsgBox which is triggered by the contents of a cell having a
specific value.

In the worksheet code module use the change event to check the value changed
is above the value

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$A$1" And Target.Value = 10 Then MsgBox "Target
Met!"
End Sub

However why not use conditional formatting to highlight the cell, you do not
need any code then?

If you need to format the Msgbox then it would be simpler to show a
userform.


--
Cheers
Nigel



"John" wrote in message
...
I am trying to generate an Info Dialog Box once a certain value is

achieved
in a cell eg. say if A1 10, then display the Info Dialog Box.

The content of this Box would depend on the values in cells, say, A2 & A3
which would contain Sales values etc. So in effect the Dialog Box would be
dynamic in terms of its content, saying something like "Your Sales

achieved
was $1,500, which was -$750 on target"

Thirdly if the above can be done, is it possible to format some of the

Text
with the box to say, bold with Red font.

If anyone has any examples I would appreciate it.

Thanks