+ Reply to Thread
Results 1 to 3 of 3

Dailog Box Q

  1. #1
    John
    Guest

    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. #2
    Nigel
    Guest

    Re: 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" <[email protected]> wrote in message
    news:[email protected]...
    > 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. #3
    John
    Guest

    Re: Dailog Box Q

    Thanks Nigel

    "Nigel" <[email protected]> wrote in message
    news:[email protected]...
    > 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" <[email protected]> wrote in message
    > news:[email protected]...
    >> 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 to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1