ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Calender Problem (https://www.excelbanter.com/excel-programming/336198-calender-problem.html)

johncassell[_20_]

Calender Problem
 

Hi,

I have a combobox and when I click the drop down button, my calende
appears. I then double click the date i want and it enters the date i
my combobox and the calender closes at the same time.

My problem is that after this procedure (i.e. if i press enter to mov
to my next box or i manually mouse click into the next box), th
calender form opens again.

Does anyone know why this is?

Thanks in advance for any replies

Joh

--
johncassel
-----------------------------------------------------------------------
johncassell's Profile: http://www.excelforum.com/member.php...fo&userid=2501
View this thread: http://www.excelforum.com/showthread.php?threadid=39236


Norman Jones

Calender Problem
 
Hi John,

In your previous thread I suggested that you post the userform code.

However the folowing worked for me as one possible arrangement:

Option Explicit
Private Sub UserForm_Initialize()
Me.Calendar1.Visible = False
End Sub

Private Sub Calendar1_DblClick()
Me.ComboBox1.Value = Me.Calendar1.Value

End Sub

Private Sub ComboBox1_Change()
Me.Calendar1.Visible = False
End Sub

Private Sub ComboBox1_MouseDown(ByVal Button As Integer, _
ByVal Shift As Integer, ByVal X As Single, _
ByVal Y As Single)
Me.Calendar1.Visible = True
End Sub


---
Regards,
Norman



"johncassell"
wrote in message
...

Hi,

I have a combobox and when I click the drop down button, my calender
appears. I then double click the date i want and it enters the date in
my combobox and the calender closes at the same time.

My problem is that after this procedure (i.e. if i press enter to move
to my next box or i manually mouse click into the next box), the
calender form opens again.

Does anyone know why this is?

Thanks in advance for any replies

John


--
johncassell
------------------------------------------------------------------------
johncassell's Profile:
http://www.excelforum.com/member.php...o&userid=25016
View this thread: http://www.excelforum.com/showthread...hreadid=392361





All times are GMT +1. The time now is 07:32 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com