Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Calendar
  New Posts New Posts RSS Feed - Custom Toolbar Button to Delete Events
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Custom Toolbar Button to Delete Events

 Post Reply Post Reply
Author
Message
dangier View Drop Down
Groupie
Groupie


Joined: 10 January 2007
Status: Offline
Points: 13
Post Options Post Options   Thanks (0) Thanks(0)   Quote dangier Quote  Post ReplyReply Direct Link To This Post Topic: Custom Toolbar Button to Delete Events
    Posted: 10 January 2007 at 3:26pm
I also want to delete an event from the calendar using a custom toolbar button. And I want to invoke the frmOccurrenceSeriesChooser.Show method if the event is a recurrence.
 
How can I delete a selected event from the calendar with a custom toolbar button?
 
I've tried modifying the existing mnuDeleteEvent_Click() event used by the right-mouse button, but I keep getting an "object not defined" error on the ContextEvent object.
Back to Top
sserge View Drop Down
Moderator Group
Moderator Group


Joined: 01 December 2004
Status: Offline
Points: 1297
Post Options Post Options   Thanks (0) Thanks(0)   Quote sserge Quote  Post ReplyReply Direct Link To This Post Posted: 10 January 2007 at 5:26pm
Yes, you should define context event before trying to delete it. I would suggest you to define it as a first selected event.

Example:

Set ContextEvent = CalendarControl.ActiveView.GetSelectedEvents(0).Event
mnuDeleteEvent_Click
Set ContextEvent = Nothing


--
WBR,
Serge
Back to Top
dangier View Drop Down
Groupie
Groupie


Joined: 10 January 2007
Status: Offline
Points: 13
Post Options Post Options   Thanks (0) Thanks(0)   Quote dangier Quote  Post ReplyReply Direct Link To This Post Posted: 10 January 2007 at 5:39pm

Thank you so much! This worked perfectly!

BTW, I'm very impressed with the quick reply.
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.172 seconds.