Forum Discussion
mark ainscough
Jul 14, 2018Brass Contributor
Combine x2 Macros into one
I need to add a vbOKCancel pop up box to thie macro below if cell Q13 = "COST" as a warning to the user. If they click ok then proceed with macro below if cancel is clicked the macro exits and does n...
Zack Barresse
Jan 04, 2019Iron Contributor
I'm not sure what you mean about combining the two macros. I don't specifically see where they're called together with a button or other routine.
As for your message box, you can use something like this:
Dim Prompt As String
Prompt = "1: A customer must been selected in cell C4" & vbNewLine & "" & vbNewLine & _
"2: A trailer number must be entered in cell C5 and must not contain any symbols" & vbNewLine & "" & vbNewLine & _
"3: A breif repair description must be entered in Cell C9 and must not contain any symbols" & vbNewLine & "" & vbNewLine & _
"4: You are connected to the network"
If MsgBox(Prompt, vbOKCancel, "THE FOLLOWING STEPS MUST BE COMPLETED") <> vbOK Then Exit Sub