MS Excel 2003, programmatically add calendar control to form using VBA
Posted on 2006-07-24
I am trying to add a Calendar Control (MSACAL) to a form using VBA using the following:
Dim calControl As Control
Set calControl = fSetup.Controls _
.Add("MSACAL.Calander.1", "calControl", True)
When this code runs, I receive a runtime error stating “invalid class string”:
I do have a reference to the msacal.ocx established. Apparently, I am referencing the ProgID incorrectly.