Prompt when Cell Changes to > 0

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I have 3 sheets whereby sheet 1 is linked to sheets 2 & 3. If I type some
things in sheets 2 & 3, cell C36 in sheet 1 may or may not change. If it
changes to more than 0, I want a message box to prompt me.

I setup the vba code as below BUT it only works if the changes are done in
sheet 1, ie, if i change some things in sheets 2 & 3 and C35 in sheet 1
changes, there is no prompt but if I change some things in sheet 1 such that
C36 changes, THEN i get the prompt. How can I change the code to do what I
want in paragraph 1 above?

Thanks!

Private Sub Worksheet_Change(ByVal Target As Range)


Dim Change As Variant

Change = Range("C36").Value
If Change > 0 Then
MsgBox "Error"
End If


End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top