0

Good afternoon,

I'm using an ActiveXControl to choose a date on calendar. I would like to call this calendar by double cliking on a cell.

I'm able to do the action by clicking on a cell, but I can't find a way to show my calendar.

My code : The problem is located Where the * is

Private Sub Worksheet_BeforeDoubleClick(ByVal target As Range, Cancel As Boolean)

Dim Date_Debut, Date_Fin As String

Date_Debut = "$C$35"
Date_Fin = "$C$36"

Char_cellule_click = target.Address

Select Case Char_cellule_click

     Case Date_Debut
     Range("$B$35").Select
*    Call Externe_Picker_Start_CallbackKeyDown

     Case Date_Fin
     Range("$B$36").Select
     Form2.Show

End Select

End Sub

The only thing I can do so far is to show the activeXControl by doing :

     Case Date_Debut
     Range("$B$35").Select
     Externe_Picker_Start.Visible = True

What I would like is an action that simulates the click on the down Arrow of my activeXcontrol to show the calendar. Is it possible?

enter image description here

I hope I'm being clear. Let me know if not.

Thankis in advance for your help.

Best regards,

Jean

Community
  • 1
  • 1
Jeanjean
  • 723
  • 2
  • 12
  • 22
  • 1
    `If you are planning to distribute or share your workbook with other users then using the ActiveXControl is a bad idea. Consider using [this](https://stackoverflow.com/questions/12012206/formatting-mm-dd-yyyy-dates-in-textbox-in-vba/12013961#12013961) – Siddharth Rout Jun 02 '17 at 12:19
  • Hi and thanks for your answer. I just laoded the form. It is very slow on my computer. it takes a while to load and then like 3 to 5 seconds to change months. Considering it starts from Jan 2000, it's gonna take a while to get a date in 2017! Plus, there is a one day difference between the weekdays in your calendar. (NB: Maybe this is linked to my French evrsion of Excel. Weekdays start from Monday, not Sunday). I'm not gonna share this file. Unless the form can work in a faster way, I prefer to use an ActiveXControl. Any idea? See you – Jeanjean Jun 02 '17 at 12:43
  • There are other answers in that post as well... :) Check them out. if you are still not happy then let me know and I will install the ocx to test it for you – Siddharth Rout Jun 02 '17 at 12:44
  • Thanks Siddharth Rout, I'll try those during this w-e and will let you know :) – Jeanjean Jun 02 '17 at 13:04
  • Once I needed a calendar control, the ActiveX one was really disappointing, so I built custom one, I can share if you want... – avb Jun 02 '17 at 13:05

0 Answers0