T
theintern
Is there a way to have an if statement inside a msgbox? i tried just
throwing it in there and it didn't like it too much. see code below.
MsgBox "In " & MonthBox.Value & " " & YearBox.Value & ":" _
& vbCrLf & " SM hours: " & (totSM) _
& vbCrLf & " SM jobs: " & numSM _
& vbCrLf & " SM ave: " & Format(totSM / numSM,
"0.00") & " hours per job" _
& If Not total=0 then
& vbCrLf & vbCrLf & " Relative Percentages SM: " &
Format(totSM /total, "0.00%") _
& vbCrLf & " PIP: "
& Format(totPIP / total, "0.00%") _
& vbCrLf & " PLB: "
& Format(totPLB / total, "0.00%") _
end if
thanks!
scott
throwing it in there and it didn't like it too much. see code below.
MsgBox "In " & MonthBox.Value & " " & YearBox.Value & ":" _
& vbCrLf & " SM hours: " & (totSM) _
& vbCrLf & " SM jobs: " & numSM _
& vbCrLf & " SM ave: " & Format(totSM / numSM,
"0.00") & " hours per job" _
& If Not total=0 then
& vbCrLf & vbCrLf & " Relative Percentages SM: " &
Format(totSM /total, "0.00%") _
& vbCrLf & " PIP: "
& Format(totPIP / total, "0.00%") _
& vbCrLf & " PLB: "
& Format(totPLB / total, "0.00%") _
end if
thanks!
scott