• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Pop-Up Calendar Deletion

bokishai

New Member
Hello All,

I created a pop-up calendar using the Microsoft MonthView Control 6.0 and a command button to close the calendar and it works completely fine. Below code for your reference:
Code in the Command Button:
Private Sub cmdClose_Click()
Unload Me
End Sub

Code in the MonthView:

Private Sub MonthView1_DateClick(ByVal DateClicked As Date)
On Error Resume Next
ActiveCell.Value = DateClicked
Unload Me
End Sub

Code in the Workbook:

Private Sub Workbook_BeforeClose(Cancel As Boolean)
On Error Resume Next
Application.OnKey "+^{C}"
Application.CommandBars("Cell").Controls("Insert Date").Delete
End Sub

Private Sub Workbook_Open()
On Error Resume Next
Dim NewControl As CommandBarControl
Application.OnKey "+^{C}", "Module1.OpenCalendar"
Application.CommandBars("Cell").Controls("Insert Date").Delete
Set NewControl = Application.CommandBars("Cell").Controls.Add
With NewControl
.Caption = "Insert Date"
.OnAction = "Module1.OpenCalendar"
.BeginGroup = True
End With
End Sub

Code in the Module:
Sub OpenCalendar()
frmCalendar.Show
EndSub
However, now even after deleting the code and the workbook itself, I can still see the "Insert Calendar" upon right click and unsure how this can be completely removed.

Is there any way this can be removed?

Thanks in advance of your assistance.

Regards,
Sachin
 
Not sure, what you meant by uninstalling Microsoft MonthView Control 6.0 itself? I have removed it from the additional controls but have not uninstalled anything
 
Back
Top