For example code:
show_box()
Function show_box()
result = MsgBox ("Please follow steps in document"vbCrLf & vbCrLf _
& "Click OK to call sum procedure" & vbCrLf & vbCrLf _
& "Click No to call substraction procedure"& vbCrLf & vbCrLf _
& "Click cancel to print hello")
Select Case result
case 1
msgbox(sum(1,2))
case 7
msgbox(substraction(4,2))
Case 2
msgbox("Hello")
End Select
END Function
sub sum(a,b)
sum = a+b
msgbox(sum)
end sub
sub substraction(a,b)
substraction = a - b
msgbox(substraction)
end sub
The result should be: When I click on OK, then call sum(a,b) procedure, and so on. I tried many times using different approach but I was not able to fix that. Help will be most appreciated!!