Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default 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   Report Post  
Posted to microsoft.public.excel.programming
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




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to stop a Smart Tag Login Dailog box when excel opens R. S. Excel Discussion (Misc queries) 0 January 13th 07 02:10 PM
suppressing auto-dailog boxes Chas Excel Programming 1 October 21st 05 05:44 PM
How to depress confirmation dailog Irshad Alam Excel Programming 1 July 5th 05 07:54 AM


All times are GMT +1. The time now is 11:45 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"