Hi All!
I am attempting to create a pop up message box when a user closes the spreadsheet. I'd like it to function by:
1. Showing the Yes/No message box when the user attempts to close the sheet.
2. Send user to a link (google doc) if Yes is chosen.
3. Close sheet if No is chosen.
Here is my attempt (full google link removed), but the the Yes action breaks down:
Private Sub Workbook_BeforeClose(Cancel As Boolean)
If MsgBox("Is this working?", _
vbQuestion + vbYesNo) = vbYes Then
objshell.Run ("https://docs.google.com/forms/d/e/....")
Else
Cancel = True
End If
End Sub
Admittedly I am a complete macro/VBa novice, so I pieced this together from various Google searches.
Any help is appreciated!!
Thanks!
I am attempting to create a pop up message box when a user closes the spreadsheet. I'd like it to function by:
1. Showing the Yes/No message box when the user attempts to close the sheet.
2. Send user to a link (google doc) if Yes is chosen.
3. Close sheet if No is chosen.
Here is my attempt (full google link removed), but the the Yes action breaks down:
Private Sub Workbook_BeforeClose(Cancel As Boolean)
If MsgBox("Is this working?", _
vbQuestion + vbYesNo) = vbYes Then
objshell.Run ("https://docs.google.com/forms/d/e/....")
Else
Cancel = True
End If
End Sub
Admittedly I am a complete macro/VBa novice, so I pieced this together from various Google searches.
Any help is appreciated!!
Thanks!