destroy Origin object
VB: Function Destroy As Integer
C++: int Destroy
C#: int Destroy
Dim myobj As Origin.Application Dim mypage As Origin.Page Dim myWks As Origin.Worksheet Dim myCol As Origin.Column 'Open a new instance of the Origin application Set myobj = GetObject("", "Origin.Application") myobj.Execute ("doc -mc 1") 'base on 0 myobj.NewProject Set mypage = myobj.Pages(0) 'base on 0 Set myWks = mypage.Layers(0) 'start from 0 Set myCol = myWks.Columns(1) 'remove this column, default remove Col Y myCol.Destroy
Dim myobj As Origin.ApplicationSI Dim mypage As Origin.Page Dim myWks As Origin.Worksheet Dim myNote As Origin.Note Dim nSucceed As Long 'Open a new instance of the Origin application Set myobj = GetObject("", "Origin.ApplicationSI") myobj.Execute ("doc -mc 1") 'base on 0 myobj.NewProject 'add the note Set myNote = myobj.Notes.Add 'the note destroy nSucceed = myNote.Destroy()
8.0SR2