Message user upon application exit using notifications

You need to be logged in to view this content. Please login or become a member.

 Stephen Gostkowski Womens Jersey

3 Comments

  1. adavies

    Hi,

    I have managed to get the macro running on start up, but it doesn’t appear to run at close / exit… I have now added a couple of messages boxes to the code to debug it and it appears to run all of the code apart from.

    Private Function swapp_DestroyNotify() As Long
    MsgBox “Reminder: Transfer your license.”, vbMsgBoxSetForeground + vbSystemModal + vbOKOnly
    End Function

    Do you have any suggestions?

    Many thanks Andy

    • Andy, it looks like DestroyNotify doesn’t work in 2013 or 2014. I will talk to API support about this because it appears to be a bug.

    • Update: After talking to SolidWorks API support, they said that this event is not intended to work with VBA. The API Help summary for “DSldWorksEvents_DestroyNotifyEventHandler Delegate” says this:

      “Sent to an MFC-based or a COM-based DLL add-in when SOLIDWORKS is about to be destroyed.”

      Hence this excludes VBA. Regardless, since it seems to work for some people in some versions, I’ll keep the macro posted for now.

Questions and Comments

You must be logged in to post a comment.