Hi all,
This is my first message, I hope I'm not doubling up and the answers to my problem isn't already in the forum (which I've gone through extensively).
I've just started VBA from scratch and with the help of several macros I found here and there, I wrote this code which works fine. My problem is that when I open the file on the spreadsheet "Berth Summary", I get the error listed in the subject of this thread.
Could anyone point me in the right direction or highlight what is clearly going wrong? I have no knowledge in coding and feel that it is a simple mistake 
Thanks in advance!
IM
This is my first message, I hope I'm not doubling up and the answers to my problem isn't already in the forum (which I've gone through extensively).
I've just started VBA from scratch and with the help of several macros I found here and there, I wrote this code which works fine. My problem is that when I open the file on the spreadsheet "Berth Summary", I get the error listed in the subject of this thread.
Code:
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
If ActiveSheet.Name = "Berth Summary" Then
If Not Intersect(Target, Sh.Range("ScenarioSelectorAl")) Is Nothing Then
Call DO_All(Sh, Target, "Berth Summary", "Al Schedule", "ScenarioSelectorAl")
ElseIf Not Intersect(Target, Sh.Range("ScenarioSelectorCoke")) Is Nothing Then
Call DO_All(Sh, Target, "Berth Summary", "Coke Schedule", "ScenarioSelectorCoke")
ElseIf Not Intersect(Target, Sh.Range("ScenarioSelectorAlF3")) Is Nothing Then
Call DO_All(Sh, Target, "Berth Summary", "AlF3 Schedule", "ScenarioSelectorAlF3")
End If
ElseIf ActiveSheet.Name = "Al Schedule" Then
If Not Intersect(Target, Sh.Range("ScenarioSelectorAl")) Is Nothing Then
Call DO_All(Sh, Target, "Berth Summary", "Al Schedule", "ScenarioSelectorAl")
End If
ElseIf ActiveSheet.Name = "Coke Schedule" Then
If Not Intersect(Target, Sh.Range("ScenarioSelectorCoke")) Is Nothing Then
Call DO_All(Sh, Target, "Berth Summary", "Coke Schedule", "ScenarioSelectorCoke")
End If
ElseIf ActiveSheet.Name = "AlF3 Schedule" Then
If Not Intersect(Target, Sh.Range("ScenarioSelectorAlF3")) Is Nothing Then
Call DO_All(Sh, Target, "Berth Summary", "AlF3 Schedule", "ScenarioSelectorAlF3")
End If
End If
End Sub
Thanks in advance!
IM