Picking a date |
Post Reply |
Author | |
dexatron
Newbie Joined: 27 January 2010 Status: Offline Points: 9 |
Post Options
Thanks(0)
Posted: 27 January 2010 at 8:59am |
Hi, I have a quick question for you.
I want to use the calendar manually. That is I need a few events that include: Date change --> returns the date clicked on Month change --> notifies that the month has changed Event click --> returns the id of an event so that I can take action The Date change is the most important to me, I've been trying to extract this using the dbl-click event, with hittest but obviously this line of code doesn't work becuase there is no selection property. gDate = Format(CalendarControl.ActiveView.days(CalendarControl.ActiveView.Selection).Date, "YYYY-MM-DD") any help greatly appreciated, Greg |
|
mdoubson
Senior Member Joined: 17 November 2008 Status: Offline Points: 1705 |
Post Options
Thanks(0)
|
Why don't use same way as in function which use HitTest.ViewEvent.Event (e.g. you can use HitTest.ViewEvent.Event.StartTime)
Private Sub CalendarControl_DblClick()
Dim HitTest As CalendarHitTestInfo Set HitTest = CalendarControl.ActiveView.HitTest Dim Events As CalendarEvents If Not HitTest.HitCode = xtpCalendarHitTestUnknown Then ' Set Events = CalendarControl.DataProvider.RetrieveDayEvents(HitTest.ViewDay.Date) End If If HitTest.ViewEvent Is Nothing Then MsgBox HitTest.HitDateTime mnuNewEvent_Click Else ModifyEvent HitTest.ViewEvent.Event End If End Sub |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |