Method: Copy for ReportObjects
- Updated2024-09-12
- 1 minute(s) read
DIAdem REPORT > Methods > Method: Copy for ReportObjects
Method: Copy for ReportObjects
Copies an object in DIAdem REPORT.
Set oReportObject = Object.Copy(NameOrIndex, NewName, InsertOnSheet)
Object | ReportObjects Object with this method |
NameOrIndex | Variant Specifies the name or the index of the object. |
NewName | String Specifies the name of the new object. |
InsertOnSheet | Variant Specifies the name or index of the target worksheet. |
oReportObject | ReportObject Returned object |
The following example copies a frame:
VBScript | Python |
Dim oMyObjects, oMyPosition, oMyFrame, oMyCopyFrame Call Report.NewLayout() Set oMyObjects = Report.ActiveSheet.Objects Set oMyFrame = oMyObjects.Add(eReportObjectFrame,"MyFrame") Set oMyCopyFrame = oMyObjects.Copy("MyFrame","MyFrame2",1) Set oMyPosition = oMyCopyFrame.Position.ByBorder oMyPosition.Left = 30 oMyPosition.Bottom = 30 oMyPosition.Height = 40 oMyPosition.Width = 40 Call Report.Refresh()