1.4.6 Setting Up Worksheet Column Labels

User Defined Labels

Excel VBA to Configure Worksheet Including Two User Defined Labels

Option Explicit
Public Sub SetupWksLabels()
    Dim app As Origin.ApplicationSI
    Dim wbk As Origin.WorksheetPage
    Dim Wks As Origin.Worksheet
    Dim col As Origin.Column
    Dim ii As Integer
    Set app = New Origin.ApplicationSI
    app.NewProject
    Set wbk = app.WorksheetPages.Add
    Set Wks = wbk.Layers(0)
    Set col = Wks.Columns.Add("AA")
    Wks.Labels ("LD1D2")
    Wks.UserDefLabel() = "First User Label Row"
    Wks.UserDefLabel(1) = "Secon User Label Row"
    col.UserDefLabel() = "My First"
    col.UserDefLabel(1) = "My Second"
    col.LongName = "My Long Name"
End Sub