rob51852

Board Regular
Joined
Jun 27, 2016
Messages
190
Office Version
  1. 2016
Platform
  1. Windows
Hello guys

I have used a spreadsheet with the following code for a while but it seems to have stopped working. I haven't made any other changes so I am scratching my head. Can anyone see what is wrong?

Thank you

Code:
Private Sub Worksheet_Change(ByVal Target As Range)Application.ScreenUpdating = False
Dim rng As Range
Set rng = Application.Union(Worksheets("Market").Range("Z5"), Worksheets("Market").Range("AA5"), Worksheets("Market").Range("AC5"), Worksheets("Market").Range("Z6"), Worksheets("Market").Range("AA6"), Worksheets("Market").Range("AC6"))
If Not Intersect(Target, rng) Is Nothing Then
    If Worksheets("Market").Range("Z5") = "0" And Worksheets("Market").Range("AA5") = "0" And Worksheets("Market").Range("AC5") = "Y" And Worksheets("Market").Range("Z6") = "0" And Worksheets("Market").Range("AA6") = "0" And Worksheets("Market").Range("AC6") = "N" Then Call Server1
    If Worksheets("Market").Range("Z5") = "0" And Worksheets("Market").Range("AA5") = "0" And Worksheets("Market").Range("AC5") = "N" And Worksheets("Market").Range("Z6") = "0" And Worksheets("Market").Range("AA6") = "0" And Worksheets("Market").Range("AC6") = "Y" Then Call Server2
End If
Application.ScreenUpdating = True
End Sub
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
Hello,

It might just be ... your event macros got stuck ...

Just close your file and close Excel ...

Then re-open ... and test ...

HTH
 
Upvote 0

Forum statistics

Threads
1,214,926
Messages
6,122,305
Members
449,079
Latest member
juggernaut24

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top