vba to set calendar object auto load to TRUE

M

michael.beckinsale

Hi All,

I have a calendar control object on my worksheet that is named
'calendar1' When i go into design mode it says that the embedded
control is 'MSCAL.Calendar.7'

I would like to set the 'autoload' property to TRUE on opening the
workbook but cant seem to get the coding right. Here's what l have
tried:

ActiveSheet.Shapes("Calendar1").AutoLoad = True

Can anybody help with this code please?

Regards

Michael Beckinsale
 
N

NickHK

Michael,
Reading the help on the property :
"This property is ignored by ActiveX controls. ActiveX controls are always
loaded when a workbook is opened."
and
"For most OLE object types, this property shouldn't be set to True"

I've always been somewhat unsure of the difference between MSs definitions
of OLE and ActiveX in a VB/VBA sense, so, I'm not sure if the above applies,
although to me the calendar control is an ActiveX control that becomes an
OLE object once on the WS.

However, AutoLoad is member of OLEObjects, not Shapes.

Not really an answer, but...

NickHK
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top