Hi,
I have 3 sheets whereby sheet 1 is linked to sheets 2 amp; 3. If I type some
things in sheets 2 amp; 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 amp; 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(quot;C36quot;).Value
If Change gt; 0 Then
MsgBox quot;Errorquot;
End IfEnd Sub
Maybe using worksheet_calculate would be better than _change.
Dolphinv4 wrote:
gt;
gt; Hi,
gt;
gt; I have 3 sheets whereby sheet 1 is linked to sheets 2 amp; 3. If I type some
gt; things in sheets 2 amp; 3, cell C36 in sheet 1 may or may not change. If it
gt; changes to more than 0, I want a message box to prompt me.
gt;
gt; I setup the vba code as below BUT it only works if the changes are done in
gt; sheet 1, ie, if i change some things in sheets 2 amp; 3 and C35 in sheet 1
gt; changes, there is no prompt but if I change some things in sheet 1 such that
gt; C36 changes, THEN i get the prompt. How can I change the code to do what I
gt; want in paragraph 1 above?
gt;
gt; Thanks!
gt;
gt; Private Sub Worksheet_Change(ByVal Target As Range)
gt;
gt; Dim Change As Variant
gt;
gt; Change = Range(quot;C36quot;).Value
gt; If Change gt; 0 Then
gt; MsgBox quot;Errorquot;
gt; End If
gt;
gt;
gt; End Sub
--
Dave Peterson
- Mar 13 Thu 2008 20:43
Prompt when Cell Changes to gt; 0
close
全站熱搜
留言列表
發表留言
留言列表

