Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Prompt when Cell Changes to 0
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 |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Prompt when Cell Changes to 0
Maybe using worksheet_calculate would be better than _change.
Dolphinv4 wrote: 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 -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Dates of a Day for a month & year cell formulas | Excel Discussion (Misc queries) | |||
How to Copy the value of a cell to any given cell | Excel Discussion (Misc queries) | |||
Cell color based upon cell value | Excel Discussion (Misc queries) | |||
cell color index comparison | New Users to Excel | |||
VLookup resulting in a blank cell... | Excel Worksheet Functions |