View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
bw bw is offline
external usenet poster
 
Posts: 74
Default Keep scrolling until mouse released

When I click on a calendar control, the following event is executed one
time, to move the next month. I'd like to know how to code this so the
calendar would move from month to month as long as the mouse is depressed.
I would assume that code would also allow me to control the "scroll rate"
while the mouse is depressed.

Thanks for your help,
Bernie

Private Sub cmdMonthUp_Click()
Call SetDate("M", 1)
End Sub

Private Function SetDate(Unit As String, Optional intStep As Integer = 1)
Me.txtDate = DateAdd(Unit, intStep, Me.txtDate)
Call ShowCal
End Function