Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Dailog Box Q
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Dailog Box Q
Thanks Nigel
"Nigel" wrote in message ... 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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to stop a Smart Tag Login Dailog box when excel opens | Excel Discussion (Misc queries) | |||
suppressing auto-dailog boxes | Excel Programming | |||
How to depress confirmation dailog | Excel Programming |