

But after registering mscomct2 DOS msg shows it is succeeded, but it is not. But Microsoft MonthView Control is missing in excel form controls. These are system controls, so they won't be as straightforward as using Excel or Office controls. I'm sure it's possible to access them via VBA, but I've never done so and am unlikely to be able to offer much advice should you go that path. Hi experts, i m new to vba, i would like to insert a date picker calendar in my VBA Form. Google 'alternative to MonthView' and you should get plenty of hits. Fortunately it was never a particularly good add-in, so there are plenty of custom VBA solutions out there - Dave Hawley used to have one on his website.

The reason I was able to is that the Calendar Control is standard with Office Professional (and also with stand-alone Access, but I think not with stand-alone Excel), and all our PCs have Office Pro licenses, so that control was already available.Īnother possibility might be the standard Windows MonthCalendar and DateTimePicker controls. Microsoft stopped support for VBA 6.0 in 2008, so the fact it's continued to work for 11 years is extraordinarily good luck. I've used the Calendar control successfully on a fairly tight security network. > Now you can see it in a list of additional tools for the userform. > then in C:\Windows\System32 find the MSCOMCT2.cab and click on ok button. There's lots out there. I can't vouch for any of them (I haven't tried any), but I do suggest before you download any that you make sure they'll work with your date format (eg mm-dd-yy vs dd-mm-yy), and as most of them are downloaded in Excel format it would be wise to run a virus scan on them before opening (although that won't save you from nasty code). > Click on More Controls > then click on Register Custom Button.

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.Try a web search on "vba calendar". Set NewControl = Application.CommandBars("Cell").Controls.Add Private Sub Workbook_BeforeClose(Cancel As Boolean)Īpplication.CommandBars("Cell").Controls("Insert Date").DeleteĪpplication.OnKey "+^", "Module1.OpenCalendar" Private Sub MonthView1_DateClick(ByVal DateClicked As Date) It is unclear where to download this file from and if this is for 64 bit machines. Either control can be used for date entry and display. Both of these can be found in the Microsoft Windows Common Controls2 6.0 component. Browsing research suggest that it may now be called Date and Time Picker Control in the mscomct2.ocx which does not appear to be installed on my system. New additions to the latest version of Visual Basic are the DateTimePicker (DTPicker) and MonthView controls. 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. I am looking for the Calendar Control that should be an Additional Control in the ToolBox.
