I have figured out how to include a macro in my custom ribbon "<button id="RunMyMacro2" label="Save and Close" onAction="Quit"/>" , however I am unsure if I can include a module I have the attached coded module in my database " Private Sub ExtBtn_Click()
Dim Msg, Style, Title, Response, MyString
Msg = "Are you sure you want to close the database?"
Style = vbYesNo + vbCritical + vbDefaultButton2
Title = "You Are Closing The Database"
Response = MsgBox(Msg, Style, Title)
If Response = vbYes Then
MyString = "Yes"
DoCmd.Quit acQuitSaveAll
Else
MyString = "No"
DoCmd.CancelEvent
End If
End Sub" Can I include it in my code somehow, alternatively can I translate the module into a macro as the yes no cancel option is not included in the standard macro builder?