Re: Specific cell

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Bob,

Thanks for you help it works.

Best regards,

Chris

"Bob Phillips" wrote:

> Private Sub Worksheet_Change(ByVal Target As Range)
>
> On Error GoTo ws_exit:
> Application.EnableEvents = False
> If Target.Address = "$A$1" Then
> If Target.Value < 10 Then
> MsgBox "A1 changed"
> End If
> End If
>
> ws_exit:
> Application.EnableEvents = True
> End Sub
>
> 'This is worksheet event code, which means that it needs to be
> 'placed in the appropriate worksheet code module, not a standard
> 'code module. To do this, right-click on the sheet tab, select
> 'the View Code option from the menu, and paste the code in.
>
>
> --
> HTH
>
> Bob Phillips
>
> "chris" <chris@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
> news:FC52B1EA-FA44-4951-8000-9EFB5E7B2E5D@xxxxxxxxxxxxxxxx
> > Hello,
> >
> > I am currently building an Excel sheet that need to show a message if a
> user
> > changes the value of a specific cell.
> > For example the message needs to appear if the value of the cell A1 is
> below
> > ten, but I only want to show the message when the user changes the value.
> So
> > if the user changes cell B1 and the value of A1 is below ten I don't want
> the
> > message to appear.
> >
> > Can anybody help me out?
> >
> > Best regards,
> >
> > Chris
> >
>
>
>
.



Relevant Pages

  • Re: initialise declaration
    ... Tom made a mistake. ... (replace somewhere in email address with gmail if mailing direct) ... Private Sub Worksheet_Activate ... Bob Phillips wrote: ...
    (microsoft.public.excel.programming)
  • Re: Application.visible........
    ... Bob Phillips wrote: ... Private Sub Userform_Activate ... Function VisibleBooks() As Long ... Dim cWBs As Long ...
    (microsoft.public.excel.programming)
  • Re: Use of check boxes
    ... "Bob Phillips" wrote: ... Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, ... How do you trip the cell back to an empty state? ...
    (microsoft.public.excel.programming)
  • Re: Cut button is disabled
    ... Thanx & regards, ... "Ron de Bruin" wrote: ... Private Sub Worksheet_Deactivate ...
    (microsoft.public.excel.programming)
  • Re: link a cell in the Master worksheet list to a Detail works
    ... Private Sub Worksheet_SelectionChange(ByVal Target As Range) ... Sheet names. ... "Bob Phillips" wrote: ...
    (microsoft.public.excel.programming)