PDA

View Full Version : Lock OLE Excel object (VB6)



dc4life78
03-01-2009, 06:14 PM
Is there a way to prevent the user from editing an embedded OLE object on a form? The objects on the forms I have created are displaying read-only data, but if the user double-clicks on the embedded sheet it not only messes up the view going into edit mode but allows the user to make changes. There is no "Locked" property for OLE objects, so I don't know how else I can limit user access.

Jan Karel Pieterse
03-01-2009, 10:24 PM
Excel has a property called Interactive:
Application.Interactive=False

dc4life78
03-15-2009, 04:40 PM
Thank you for your assistance. Unfortunately the Interactive property only applies to Excel application objects, not embedded OLE Excel objects. Is there a way to apply this to the form objects?

Jan Karel Pieterse
03-15-2009, 10:15 PM
If I set the Autoactivate property of the OLE object to manual you cant click on it at all. Is that what you need?

dc4life78
03-16-2009, 07:32 PM
Yes, this is exactly what I need. Thank you!