Print Page | Close Window

Custom Toolbar Button to Delete Events

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Calendar
Forum Description: Topics Related to Codejock Calendar
URL: http://forum.codejock.com/forum_posts.asp?TID=6071
Printed Date: 23 November 2024 at 12:18am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Custom Toolbar Button to Delete Events
Posted By: dangier
Subject: Custom Toolbar Button to Delete Events
Date 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.



Replies:
Posted By: sserge
Date 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


Posted By: dangier
Date Posted: 10 January 2007 at 5:39pm

Thank you so much! This worked perfectly!

BTW, I'm very impressed with the quick reply.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net