Change in worksheet create an error in compile

dade652003

New Member
Joined
Apr 23, 2013
Messages
34
I have excel 2010 and so do my employee's.

For some reason some employees does not work and gives them a complile error to debug.

The code is the following:

Code:
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)

If Not Intersect(Target, [C:C]) Is Nothing And Target.Cells.Count = 1 Then
If Target.Value = "Employee" Then
Target.Offset(0, 4).Value = InputBox("Please enter the Employee's name!, Please enter name or cancel to continue")
    End If
End If
If Not Intersect(Target, [D:D]) Is Nothing And Target.Cells.Count = 1 Then
If Target.Value = "Payment" Then
Target.Offset(0, 5).Value = InputBox("Please enter $$ Amount, Please enter payment or cancel to continue")
    End If
End If
If Not Intersect(Target, [A:A]) Is Nothing And Target.Cells.Count = 1 Then
If Target.Value Then
Target.Offset(0, 1).Value = InputBox("Please enter Phone#...Incase we are disconnected, Please enter phone # or cancel to continue")
    End If
End If
If Not Intersect(Target, [B:B]) Is Nothing And Target.Cells.Count = 1 Then
If Target.Value Then
Target.Offset(0, 5).Value = InputBox("Please enter Name...Good Customer Service, Please enter phone # or cancel to continue")
    End If
End If

End Sub

Could anyone point me to the right direction as why some of my employees there is no problem and others it debugs. On my excel is runs perfectly with no bugs.
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.

Forum statistics

Threads
1,137,060
Messages
5,679,382
Members
419,824
Latest member
Mercy kiara

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
Top