Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Target.Calculate
Application.OnKey "{DELETE}"
End Sub
Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink)
If Target.Range.Column = 4 Then Call ShippingInstructions
Select Case Target.Range.Address
Case "$B$1"
Call OpenSettings
End Select
End Sub
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count > 1 Or Target.HasFormula Then Exit Sub
On Error Resume Next
If Not Intersect(Target, Range("ElevationColumn")) Is Nothing Then
Application.EnableEvents = False
Target = UCase(Target)
Application.EnableEvents = True
End If
If Target.Cells.Count > 1 Or Target.HasFormula Then Exit Sub
On Error Resume Next
If Not Intersect(Target, Range("SubLotColumn")) Is Nothing Then
Application.EnableEvents = False
If Trim(Target) <> "" Then
Target = Application.Substitute(Target, "..", ".")
End If
If InStr(1, Target, "-") > 0 Then
Target = UCase(Target)
End If
Application.EnableEvents = True
End If
On Error GoTo 0
Dim KeyCells As Range
Set KeyCells = Range("DateColumn")
If Not Application.Intersect(KeyCells, Range(Target.Address)) Is Nothing Then
Application.EnableEvents = False
Call ChangeDate
Application.EnableEvents = True
End If
If Not Intersect(Target, Range("DateColumn")) Is Nothing Then
Application.EnableEvents = False
Target = UCase(Target)
Application.EnableEvents = True
End If
Set KeyCells = Range("SubLotColumn")
If Not Application.Intersect(KeyCells, Range(Target.Address)) Is Nothing Then
Application.EnableEvents = False
Call LogInsertJob
Application.EnableEvents = True
End If
Set KeyCells = Range("CalendarFloorsInvoiceAmountColumn")
If Not Application.Intersect(KeyCells, Range(Target.Address)) Is Nothing Then
Application.EnableEvents = False
Call FloorOrderNumber
Call AddLinkGroupAuto
Application.EnableEvents = True
End If
Set KeyCells = Range("CalendarLooseLumberOrderNumberColumn")
If Not Application.Intersect(KeyCells, Range(Target.Address)) Is Nothing Then
Application.EnableEvents = False
Call LooseLumberOrderNumber
Application.EnableEvents = True
End If
Set KeyCells = Range("CalendarHousewrapOrderNumberColumn")
If Not Application.Intersect(KeyCells, Range(Target.Address)) Is Nothing Then
Application.EnableEvents = False
Call HousewrapOrderNumber
Application.EnableEvents = True
End If
Set KeyCells = Range("CalendarRoofLoadOrderNumberColumn")
If Not Application.Intersect(KeyCells, Range(Target.Address)) Is Nothing Then
Application.EnableEvents = False
Call RoofLoadOrderNumber
Application.EnableEvents = True
End If
Set KeyCells = Range("CalendarRoofLoadShipDateColumn")
If Not Application.Intersect(KeyCells, Range(Target.Address)) Is Nothing Then
Application.EnableEvents = False
Call RoofLoadShipDate
Application.EnableEvents = True
End If
Set KeyCells = Range("CalendarBoardwalksOrderNumberColumn")
If Not Application.Intersect(KeyCells, Range(Target.Address)) Is Nothing Then
Application.EnableEvents = False
Call BoardwalksOrderNumber
Application.EnableEvents = True
End If
Set KeyCells = Range("CalendarBoardwalksShipDateColumn")
If Not Application.Intersect(KeyCells, Range(Target.Address)) Is Nothing Then
Application.EnableEvents = False
Call BoardwalksShipDate
Application.EnableEvents = True
End If
Set KeyCells = Range("CalendarPorchPostsOrderNumberColumn")
If Not Application.Intersect(KeyCells, Range(Target.Address)) Is Nothing Then
Application.EnableEvents = False
Call PorchPostsOrderNumber
Application.EnableEvents = True
End If
Set KeyCells = Range("CalendarPorchPostsShipDateColumn")
If Not Application.Intersect(KeyCells, Range(Target.Address)) Is Nothing Then
Application.EnableEvents = False
Call PorchPostsShipDate
Application.EnableEvents = True
End If
Set KeyCells = Range("CalendarFyponOrderNumberColumn")
If Not Application.Intersect(KeyCells, Range(Target.Address)) Is Nothing Then
Application.EnableEvents = False
Call FyponOrderNumber
Application.EnableEvents = True
End If
Set KeyCells = Range("CalendarFyponOrderedDateColumn")
If Not Application.Intersect(KeyCells, Range(Target.Address)) Is Nothing Then
Application.EnableEvents = False
Call FyponOrderDate
Application.EnableEvents = True
End If
Set KeyCells = Range("CalendarFyponReceivedDateColumn")
If Not Application.Intersect(KeyCells, Range(Target.Address)) Is Nothing Then
Application.EnableEvents = False
Call FyponReceivedDate
Application.EnableEvents = True
End If
Set KeyCells = Range("CalendarFyponShipDateColumn")
If Not Application.Intersect(KeyCells, Range(Target.Address)) Is Nothing Then
Application.EnableEvents = False
Call FyponShipDate
Application.EnableEvents = True
End If
Set KeyCells = Range("CalendarRoofTrussesOrderNumberColumn")
If Not Application.Intersect(KeyCells, Range(Target.Address)) Is Nothing Then
Application.EnableEvents = False
Call RoofTrussesOrderNumber
Application.EnableEvents = True
End If
If Not Intersect(Target, Range("CalendarModelColumn")) Is Nothing Then
Select Case Target.Value
Case "<ADD NEW>"
Call OpenAddNewModel
End Select
End If
If Not Intersect(Target, Range("CalendarGarageHandlingColumn")) Is Nothing Then
Select Case Target.Value
Case "<ADD NEW>"
Call OpenAddNewGarageHandling
End Select
End If
Set KeyCells = Range("CalendarFloorsOrderNumberColumn")
If Not Application.Intersect(KeyCells, Range(Target.Address)) Is Nothing Then
Application.EnableEvents = False
Application.OnKey "{DELETE}", "DeleteFloorOrderNumber"
Application.EnableEvents = True
End If
Set KeyCells = Range("CalendarFloorsShipDateColumn")
If Not Application.Intersect(KeyCells, Range(Target.Address)) Is Nothing Then
Application.EnableEvents = False
Application.OnKey "{DELETE}", "DeleteFloorShipDate"
Application.EnableEvents = True
End If
Set KeyCells = Range("CalendarLooseLumberOrderNumberColumn")
If Not Application.Intersect(KeyCells, Range(Target.Address)) Is Nothing Then
Application.EnableEvents = False
Application.OnKey "{DELETE}", "DeleteLooseLumberOrderNumber"
Application.EnableEvents = True
End If
Set KeyCells = Range("CalendarBoardwalksOrderNumberColumn")
If Not Application.Intersect(KeyCells, Range(Target.Address)) Is Nothing Then
Application.EnableEvents = False
Application.OnKey "{DELETE}", "DeleteBoardwalksOrderNumber"
Application.EnableEvents = True
End If
End Sub
Private Sub Worksheet_Deactivate()
Application.OnKey "{DELETE}"
End Sub