Using the “insert Object dialog box” we can insert image,media-clip,charts,word file etc..on design time itself.
We can browse files and can create new one.
Two command buttons ,and one OLE ( Once the OLE box has appeared,click CANCEL to remove this dialog box)
A) Property :
Command button : NAME- Command1 , CAPTION- Use OLE Command button : NAME- Command2 , CAPTION- Exit OLE : NAME-OLE1 |
B) Attaching Code to the Object :
Private Sub Command1_Click() OLE1.InsertObjDlg End Sub Private Sub Command2_Click() End End Sub |
This code links or embeds the complete file.(Refer VB-7 : Part of an OLE Object also)
No comments:
Post a Comment