Consulting

Results 1 to 2 of 2

Thread: Asking confirmation user before deleting meeting or appointment in a shared calendar

  1. #1
    VBAX Newbie
    Joined
    Dec 2017
    Posts
    1
    Location

    Asking confirmation user before deleting meeting or appointment in a shared calendar

    Hello everyone,

    I'm looking for help to write a vba macro in order to add a msg box every time an user try to delete a meeting or an appointment in two specific shared calendars. The msg box would ask "are you sure you want to delete this item?" and would cancel the user action or not.

    If it could do the same when displacing an item it would be perfect! Any idea how I could do that?
    Many thanks in advance!

    Zey.

  2. #2
    Moderator VBAX Sage SamT's Avatar
    Joined
    Oct 2006
    Location
    Near Columbia
    Posts
    7,814
    Location
    Look into Outlook.MeetingItem.BeforeDelete and maybe? Outlook.MeetingItem.Move

    I don't do Outlook, but possibly something like?

    Calendar Modules Code
    Private Sub BeforeDelete(Item As Object, Cancel As Boolean)
    If Item is MeetingItem then
    MsgBox "R U Sure?"
    If MsgBoxCanceled then Cancel = True
    ElseIF Item is Appointment then
    'Same as above
    End If
    End Sub
    I expect the student to do their homework and find all the errrors I leeve in.


    Please take the time to read the Forum FAQ

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •