Hello All,
I'm almost embarrassed to be asking this because I can make things like this work in Excel but for some reason PowerPoint is stumping me.

I've got a macro that generates a table of contents and I'd like to run it whenever someone saves the powerpoint file. I'd also like a message box asking if they want to update the TOC or not.

Below is the code I have so far (saved in a module, but have also tried in a class module. But the difference between these two is starting to go beyond my level of understanding). When I hit save...nothing happens. No message box, no updated TOC, nothing. The file just saves. I'm clearly doing something wrong with the module/class settings here but I just don't know what...

Any help would be appreciated

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
Dim Msg As String, Ans As Variant


Msg = "Update Table of Contents?"


Ans = MsgBox(Msg, vbYesNo)


Select Case Ans


Case vbYes

Call SQ_TOC_Writer

Case vbNo
GoTo Quit:
End Select


Quit:

End Sub