April 2006
Beginner
1114 pages
98h 16m
English
oleobject.Duplicate( )
Creates a copy of the object and returns a reference to the copy. The following code creates a copy of an object and moves it beneath the original:
Sub CopyObject( )
Dim ole1 As OleObject, ole2 As OleObject
' Get the object.
Set ole1 = ActiveSheet.OleObjects(1)
' Create a copy.
Set ole2 = ole1.Duplicate
' Move copy under first object.
ole2.Top = ole1.Top + ole1.Height
End SubRead now
Unlock full access