Attaching Macros to Message Boxes
Posted by Sam on June 19, 2001 12:57 PM
How would I attach a macro to a msgbox so that if the user clicks OK the macro is run. This is what I have so far but I'm not sure how to run the macro.
Sub DisplayMessageBox()
Dim iYesNo As Integer
iYesNo = MsgBox("Another Macro will now run", vbYesNo)
If iYesNo = vbYes Then
-???
Else
Exit Sub
End If
End Sub
Thanks in advance.
Sam