Vous êtes sur la page 1sur 5

Private Sub Worksheet_Change(ByVal Target As Range)

If Range("AE24") = "E-W" Or Range("AE24") = "N-S" Then


Rows("49").EntireRow.Hidden = False
Rows("50").EntireRow.Hidden = True

ElseIf Range("AE24") = "Vertical" Then


Rows("49").EntireRow.Hidden = True
Rows("50").EntireRow.Hidden = False
Else

End If

End Sub

Sub CLAMP_Click()

If Sheets("Calculation").Range("AE8").Value > 130000 Or


Sheets("Calculation").Range("AE9").Value > 130000 Or
Sheets("Calculation").Range("AE10").Value > 130000 And
Sheets("Calculation").Range("AE21") = "Carbon Steel" Then
MsgBox "Warning! Clamp Design Load exceeds the Fig. 6202 Working Load. Insert
the Vendor provided data for SPECIAL RESTRAINT CLAMP.", vbExclamation, "CLAMP
DESIGN LOAD"
Sheets("Calculation").Range("AE45") = ""
Sheets("Calculation").Range("AE47") = ""
Sheets("Calculation").Range("AE48") = ""
Sheets("Calculation").Range("AE45").Interior.ColorIndex = 19
Sheets("Calculation").Range("AE47").Interior.ColorIndex = 19
Sheets("Calculation").Range("AE48").Interior.ColorIndex = 19
Sheets("Calculation").Range("C54") = "Clamp description: FIG. 6202, SPECIAL
RESTRAINT CLAMP"

ElseIf Sheets("Calculation").Range("AE21") = "Carbon Steel" And


Sheets("Calculation").Range("AE22") > 650 Then
MsgBox "Warning! Operating Temperature eceeds Clamp Max. Working Temp.
Insert the Vendor provided data for SPECIAL RESTRAINT CLAMP.", vbExclamation,
"MAXIMUM WORKING TEMPERATURE"
Sheets("Calculation").Range("AE45") = ""
Sheets("Calculation").Range("AE47") = ""
Sheets("Calculation").Range("AE48") = ""
Sheets("Calculation").Range("AE45").Interior.ColorIndex = 19
Sheets("Calculation").Range("AE47").Interior.ColorIndex = 19
Sheets("Calculation").Range("AE48").Interior.ColorIndex = 19

Sheets("Calculation").Range("C54") = "Clamp description: FIG. 6202, SPECIAL


RESTRAINT CLAMP"

ElseIf Sheets("Calculation").Range("AE21") = "Carbon Steel" And


Sheets("Calculation").Range("AE22") <= 650 And Sheets("Data").Range("AL43") =
"NA" Then
MsgBox "Warning! Clamp data NOT available for requested Pipe size. Insert the
Vendor provided data for SPECIAL RESTRAINT CLAMP.", vbExclamation, "PIPE SIZE"
Sheets("Calculation").Range("AE45") = ""
Sheets("Calculation").Range("AE47") = ""
Sheets("Calculation").Range("AE48") = ""
Sheets("Calculation").Range("AE45").Interior.ColorIndex = 19
Sheets("Calculation").Range("AE47").Interior.ColorIndex = 19
Sheets("Calculation").Range("AE48").Interior.ColorIndex = 19
Sheets("Calculation").Range("C54") = "Clamp description: FIG. 6202, SPECIAL
RESTRAINT CLAMP"

ElseIf Sheets("Calculation").Range("AE21") = "A335 P22" Then


MsgBox "Warning! Clamp Data NOT available in Cataloge. Insert the Vendor
provided data FOR ALLOY CLAMP.", vbExclamation, "This is the Title"
Sheets("Calculation").Range("AE45") = ""
Sheets("Calculation").Range("AE47") = ""
Sheets("Calculation").Range("AE48") = ""
Sheets("Calculation").Range("AE45").Interior.ColorIndex = 19
Sheets("Calculation").Range("AE47").Interior.ColorIndex = 19
Sheets("Calculation").Range("AE48").Interior.ColorIndex = 19
Sheets("Calculation").Range("C54") = "Clamp description: FIG. 6222, ALLOY
CLAMP"

ElseIf Sheets("Calculation").Range("AE21") = "A335 P91" Then


MsgBox "Warning! Clamp Data NOT available in Cataloge. Insert the
Vendor provided data for PECIAL ALLOY CLAMP.", vbExclamation, "This is the Title"
Sheets("Calculation").Range("AE45") = ""
Sheets("Calculation").Range("AE47") = ""
Sheets("Calculation").Range("AE48") = ""
Sheets("Calculation").Range("AE45").Interior.ColorIndex = 19
Sheets("Calculation").Range("AE47").Interior.ColorIndex = 19
Sheets("Calculation").Range("AE48").Interior.ColorIndex = 19
Sheets("Calculation").Range("C54") = "Clamp description: FIG. 6222,
SPECIAL ALLOY CLAMP"

Else
Sheets("Calculation").Range("AE45") = Sheets("Data").Range("R2")
Sheets("Calculation").Range("AE47") = Sheets("Data").Range("AL43")
Sheets("Calculation").Range("AE48") = Sheets("Data").Range("AL44")
Sheets("Calculation").Range("AE45").Interior.ColorIndex = 34
Sheets("Calculation").Range("AE47").Interior.ColorIndex = 34
Sheets("Calculation").Range("AE48").Interior.ColorIndex = 34
Sheets("Calculation").Range("C54") = "Clamp description: FIG. 6202,
RESTRAINT CLAMP"

End If

End Sub