Business requirements: write a VBA sub procedure to ask the…
Business requirements: write a VBA sub procedure to ask the user via an input box for the date and the event and then assign them to variables. If the event is “homework” subtract 7 days using the DateAdd function, if the event is a “quiz” subtract 30 days using the DateAdd function, and if the event is “project” subtract 45 days using the DateAdd function. Using a message box, display a meaningful message to the user showing the user’s chosen event and the calculated date. Make sure to deal in your VBA code with possible errors that can be entered for the event. To write VBA code, use Excel or Word applications. Make sure to name the variables using appropriate names and to comment on the VBA code. After testing and debugging, please submit the working VBA code below and attach the Excel file with the extension xls file to this question. Double check you attached the correct file and that the file has the VBA code. I grade only what you submitted.