Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Dolphinv4
 
Posts: n/a
Default 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   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson
 
Posts: n/a
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Dates of a Day for a month & year cell formulas mikeburg Excel Discussion (Misc queries) 2 December 29th 05 10:14 PM
How to Copy the value of a cell to any given cell Memphis Excel Discussion (Misc queries) 4 October 21st 05 08:29 PM
Cell color based upon cell value My View Excel Discussion (Misc queries) 11 July 6th 05 03:59 AM
cell color index comparison MINAL ZUNKE New Users to Excel 1 June 30th 05 07:11 AM
VLookup resulting in a blank cell... KempensBoerke Excel Worksheet Functions 1 October 28th 04 09:57 PM


All times are GMT +1. The time now is 05:54 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"