Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a command button that opens the calendar. It is for reference only.
I would like to have it close when ever I select a cell. I don't want to have to click the close button |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Is that code what you need?
Private Sub CommandButton1_Click() ' You show calender UserForm1.Show vbModeless End Sub ' Put that code you Worksheet change -module Private Sub Worksheet_SelectionChange(ByVal rng As Range) Unload UserForm1 End Sub OR ' Put that code you Workbook Sheet Chenge -module Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range) Unload UserForm1 End Sub Regards Kari J Keinonen |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Calendar Control | Excel Programming | |||
Control disappeared problem - specifically, the Calendar Control | Excel Programming | |||
calendar control 10.0 | Excel Discussion (Misc queries) | |||
Calendar Control | Excel Programming | |||
Calendar Control: Can't exit design mode because control can't be created | Excel Programming |