Re: How do I insert into a OLE Odject Type field at runtime
- From: "Warren" <warren_rapson@xxxxxxxxxxxxxxxxxxxxxx>
- Date: 7 Aug 2006 15:45:27 -0700
This is from Access Help
---------------------------------------------------------------------
OLE Object Properties Example
The following example creates a linked OLE object using an unbound
object frame named OLE1 and sizes the control to display the object's
entire contents when the user clicks a command button.
Sub Command1_Click
OLE1.Class = "Excel.***" ' Set class name.
' Specify type of object.
OLE1.OLETypeAllowed = acOLELinked
' Specify source file.
OLE1.SourceDoc = "C:\Excel\Oletext.xls"
' Specify data to create link to.
OLE1.SourceItem = "R1C1:R5C5"
' Create linked object.
OLE1.Action = acOLECreateLink
' Adjust control size.
OLE1.SizeMode = acOLESizeZoom
End Sub
---------------------------------------------------------------------------------------
I would use:
Private Sub YourButton_Click
OLE1.OLETypeAllowed = acOLELinked
OLE1.SourceDoc = "C:\YourPic.BMP"
OLE1.Action = acOLECreateLink
End Sub
Done!
.
- References:
- Re: How do I insert into a OLE Odject Type field at runtime
- From: Alex Dybenko
- Re: How do I insert into a OLE Odject Type field at runtime
- Prev by Date: RE: ODBCDirect Workspace
- Next by Date: Re: return system information using VBA
- Previous by thread: Re: How do I insert into a OLE Odject Type field at runtime
- Next by thread: Re: Insert picture
- Index(es):