Private Sub InsertRisk_Click()
Dim rngFound As Range
Dim rngSearch As Range
Dim NSERisk, EarthRisk, ElecClearRisk, SF6Risk, ArcContRisk, ConfineSpaceRisk, AboveLiveRisk, StageLiveRisk, LayDownRisk As String
Dim IndoorLightRisk, EmergExitRisk, FireRisk, OilContRisk, VentRisk, NoiseRisk, DrainRisk, FallRisk As String
Dim ElectroRisk, TrafficRisk, InRisk, GasRisk, DemRisk, AsbestosRisk, FenceRisk, SoilRisk, OtherRisk As String
Dim strMsg As String
Sheets("Hazard Identification").Select
Set rngSearch = Range("E:E")
Set rngFound = rngSearch.Find(What:="NON STANDARD EQUIPMENT", LookIn _
:=xlFormulas, LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:= _
xlNext, MatchCase:=False, SearchFormat:=False)
If rngFound Is Nothing Then
NSERisk = "N"
Else
NSERisk = "Y"
End If
Set rngFound = rngSearch.Find(What:="EARTHING", LookIn _
:=xlFormulas, LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:= _
xlNext, MatchCase:=False, SearchFormat:=False)
If rngFound Is Nothing Then
EarthRisk = "N"
Else
EarthRisk = "Y"
End If
Set rngFound = rngSearch.Find(What:="ELECTRICAL CLEARENCES", LookIn _
:=xlFormulas, LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:= _
xlNext, MatchCase:=False, SearchFormat:=False)
If rngFound Is Nothing Then
ElecClearRisk = "N"
Else
ElecClearRisk = "Y"
End If
Set rngFound = rngSearch.Find(What:="SF6", LookIn _
:=xlFormulas, LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:= _
xlNext, MatchCase:=False, SearchFormat:=False)
If rngFound Is Nothing Then
SF6Risk = "N"
Else
SF6Risk = "Y"
End If
Set rngFound = rngSearch.Find(What:="ARC CONTAINMENT", LookIn _
:=xlFormulas, LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:= _
xlNext, MatchCase:=False, SearchFormat:=False)
If rngFound Is Nothing Then
ArcContRisk = "N"
Else
ArcContRisk = "Y"
End If
Set rngFound = rngSearch.Find(What:="CONFINED SPACE", LookIn _
:=xlFormulas, LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:= _
xlNext, MatchCase:=False, SearchFormat:=False)
If rngFound Is Nothing Then
ConfineSpaceRisk = "N"
Else
ConfineSpaceRisk = "Y"
End If
Set rngFound = rngSearch.Find(What:="ABOVE LIVE", LookIn _
:=xlFormulas, LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:= _
xlNext, MatchCase:=False, SearchFormat:=False)
If rngFound Is Nothing Then
AboveLiveRisk = "N"
Else
AboveLiveRisk = "Y"
End If
Set rngFound = rngSearch.Find(What:="NEAR LIVE", LookIn _
:=xlFormulas, LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:= _
xlNext, MatchCase:=False, SearchFormat:=False)
If rngFound Is Nothing Then
StageLiveRisk = "N"
Else
StageLiveRisk = "Y"
End If
Set rngFound = rngSearch.Find(What:="LAY DOWN", LookIn _
:=xlFormulas, LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:= _
xlNext, MatchCase:=False, SearchFormat:=False)
If rngFound Is Nothing Then
LayDownRisk = "N"
Else
LayDownRisk = "Y"
End If
Set rngFound = rngSearch.Find(What:="LIGHTING", LookIn _
:=xlFormulas, LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:= _
xlNext, MatchCase:=False, SearchFormat:=False)
If rngFound Is Nothing Then
IndoorLightRisk = "N"
Else
IndoorLightRisk = "Y"
End If
Set rngFound = rngSearch.Find(What:="EMERGENCY EXIT", LookIn _
:=xlFormulas, LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:= _
xlNext, MatchCase:=False, SearchFormat:=False)
If rngFound Is Nothing Then
EmergExitRisk = "N"
Else
EmergExitRisk = "Y"
End If
Set rngFound = rngSearch.Find(What:="FIRE", LookIn _
:=xlFormulas, LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:= _
xlNext, MatchCase:=False, SearchFormat:=False)
If rngFound Is Nothing Then
FireRisk = "N"
Else
FireRisk = "Y"
End If
Set rngFound = rngSearch.Find(What:="OIL CONTAINMENT", LookIn _
:=xlFormulas, LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:= _
xlNext, MatchCase:=False, SearchFormat:=False)
If rngFound Is Nothing Then
OilContRisk = "N"
Else
OilContRisk = "Y"
End If
Set rngFound = rngSearch.Find(What:="VENTILATION", LookIn _
:=xlFormulas, LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:= _
xlNext, MatchCase:=False, SearchFormat:=False)
If rngFound Is Nothing Then
VentRisk = "N"
Else
VentRisk = "Y"
End If
Set rngFound = rngSearch.Find(What:="NOISE", LookIn _
:=xlFormulas, LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:= _
xlNext, MatchCase:=False, SearchFormat:=False)
If rngFound Is Nothing Then
NoiseRisk = "N"
Else
NoiseRisk = "Y"
End If
Set rngFound = rngSearch.Find(What:="DRAINAGE", LookIn _
:=xlFormulas, LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:= _
xlNext, MatchCase:=False, SearchFormat:=False)
If rngFound Is Nothing Then
DrainRisk = "N"
Else
DrainRisk = "Y"
Set rngFound = rngSearch.Find(What:="FALLS", LookIn _
:=xlFormulas, LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:= _
xlNext, MatchCase:=False, SearchFormat:=False)
If rngFound Is Nothing Then
FallRisk = "N"
Else
FallRisk = "Y"
End If
Set rngFound = rngSearch.Find(What:="ELECTROCUTION", LookIn _
:=xlFormulas, LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:= _
xlNext, MatchCase:=False, SearchFormat:=False)
If rngFound Is Nothing Then
ElectroRisk = "N"
Else
ElectroRisk = "Y"
End If
Set rngFound = rngSearch.Find(What:="TRAFFIC", LookIn _
:=xlFormulas, LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:= _
xlNext, MatchCase:=False, SearchFormat:=False)
If rngFound Is Nothing Then
TrafficRisk = "N"
Else
TrafficRisk = "Y"
End If
Set rngFound = rngSearch.Find(What:="INHALATION", LookIn _
:=xlFormulas, LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:= _
xlNext, MatchCase:=False, SearchFormat:=False)
If rngFound Is Nothing Then
InRisk = "N"
Else
InRisk = "Y"
End If
Set rngFound = rngSearch.Find(What:="TOXIC GASES", LookIn _
:=xlFormulas, LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:= _
xlNext, MatchCase:=False, SearchFormat:=False)
If rngFound Is Nothing Then
GasRisk = "N"
Else
GasRisk = "Y"
End If
Set rngFound = rngSearch.Find(What:="DEMOLITION", LookIn _
:=xlFormulas, LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:= _
xlNext, MatchCase:=False, SearchFormat:=False)
If rngFound Is Nothing Then
DemRisk = "N"
Else
DemRisk = "Y"
End If
Set rngFound = rngSearch.Find(What:="ASBESTOS", LookIn _
:=xlFormulas, LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:= _
xlNext, MatchCase:=False, SearchFormat:=False)
If rngFound Is Nothing Then
AsbestosRisk = "N"
Else
AsbestosRisk = "Y"
End If
Set rngFound = rngSearch.Find(What:="FENCING", LookIn _
:=xlFormulas, LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:= _
xlNext, MatchCase:=False, SearchFormat:=False)
If rngFound Is Nothing Then
FenceRisk = "N"
Else
FenceRisk = "Y"
End If
Set rngFound = rngSearch.Find(What:="SOIL CONTAMINATION", LookIn _
:=xlFormulas, LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:= _
xlNext, MatchCase:=False, SearchFormat:=False)
If rngFound Is Nothing Then
SoilRisk = "N"
Else
SoilRisk = "Y"
End If
Set rngFound = rngSearch.Find(What:="OTHER", LookIn _
:=xlFormulas, LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:= _
xlNext, MatchCase:=False, SearchFormat:=False)
If rngFound Is Nothing Then
OtherRisk = "N"
Else
OtherRisk = "Y"
End If
End If
strMsg = "Standard Risks Already Included:" & vbCrLf
strMsg = strMsg & "NON STANDARD EQUIPMENT : " & NSERisk & vbCrLf
strMsg = strMsg & "EARTHING : " & EarthRisk & vbCrLf
strMsg = strMsg & "ELECTRICAL CLEARENCES : " & ElecClearRisk & vbCrLf
strMsg = strMsg & "SF6 : " & SF6Risk & vbCrLf
strMsg = strMsg & "ARC CONTAINMENT : " & ArcContRisk & vbCrLf
strMsg = strMsg & "CONFINED SPACE : " & ConfineSpaceRisk & vbCrLf
strMsg = strMsg & "WORKING ABOVE LIVE EQUIPMENT : " & AboveLiveRisk & vbCrLf
strMsg = strMsg & "STAGING & WORK NEAR LIVE CONDUCTORS : " & StageLiveRisk & vbCrLf
strMsg = strMsg & "LAY DOWN AREA : " & LayDownRisk & vbCrLf
strMsg = strMsg & "INDOOR LIGHTING : " & IndoorLightRisk & vbCrLf
strMsg = strMsg & "EMERGENCY EXIT LOCATIONS : " & EmergExitRisk & vbCrLf
strMsg = strMsg & "FIRE/EXPLOSION : " & FireRisk & vbCrLf
strMsg = strMsg & "OIL CONTAINMENT : " & OilContRisk & vbCrLf
strMsg = strMsg & "VENTILATION FOR INDOOR SWITCHROOMS : " & VentRisk & vbCrLf
strMsg = strMsg & "NOISE : " & NoiseRisk & vbCrLf
strMsg = strMsg & "DRAINAGE : " & DrainRisk & vbCrLf
strMsg = strMsg & "FALLS : " & FallRisk & vbCrLf
strMsg = strMsg & "ELECTROCUTION : " & ElectroRisk & vbCrLf
strMsg = strMsg & "TRAFFIC MANAGEMENT : " & TrafficRisk & vbCrLf
strMsg = strMsg & "INHALATION OF FUMES/DUST : " & InRisk & vbCrLf
strMsg = strMsg & "TOXIC GASES / VAPOURS / CHEMICALS : " & GasRisk & vbCrLf
strMsg = strMsg & "DEMOLITION : " & DemRisk & vbCrLf
strMsg = strMsg & "ASBESTOS : " & AsbestosRisk & vbCrLf
strMsg = strMsg & "FENCING (SECURITY) : " & FenceRisk & vbCrLf
strMsg = strMsg & "SOIL CONTAMINATION : " & SoilRisk & vbCrLf
strMsg = strMsg & "OTHER : " & OtherRisk & vbCrLf
'MsgBox (strMsg)
If MsgBox(strMsg, vbOKCancel, "Standard Risks Already Included - ") = vbCancel Then
Exit Sub
End If
AddRisk_Initialize
AddRisk.Show
End Sub