jd0695
06-21-2011, 08:13 AM
Hi All,
I have a form with an OLEobject that contains an embedded bitmap image. When I double click on the object the image opens in paint, which is exactly what I need it to do.
What I'd like to do is have a button on the form that, when clicked, copies a template bitmap image to the oleobject (that bit already works) and then activates the object so paint opens up.
Anyone know how I can make the OLEobject activate from a button on a form?
I hope that made sense?
I have found this code, but having a problem making it work:
On Click event procedure for the button that will activate the object...
With Forms.Item("formname").Controls.Item("oleobjectName")
.Action = acOLEActivate
.Verb = acOLEVerbOpen
End With
My "formname" is tblpayestimates subform, my form name is tblpayestimates
My "oleobjectname" is located on my F drive.
I don't have a complete grasp on code writing.
Running 2010
Thats about it in a nut shell
Edited 30-Jun-11 by geekgirlau. Reason: remove HTML tags, add VBA tags
I have a form with an OLEobject that contains an embedded bitmap image. When I double click on the object the image opens in paint, which is exactly what I need it to do.
What I'd like to do is have a button on the form that, when clicked, copies a template bitmap image to the oleobject (that bit already works) and then activates the object so paint opens up.
Anyone know how I can make the OLEobject activate from a button on a form?
I hope that made sense?
I have found this code, but having a problem making it work:
On Click event procedure for the button that will activate the object...
With Forms.Item("formname").Controls.Item("oleobjectName")
.Action = acOLEActivate
.Verb = acOLEVerbOpen
End With
My "formname" is tblpayestimates subform, my form name is tblpayestimates
My "oleobjectname" is located on my F drive.
I don't have a complete grasp on code writing.
Running 2010
Thats about it in a nut shell
Edited 30-Jun-11 by geekgirlau. Reason: remove HTML tags, add VBA tags