Examples: RemoveColumn method

This agent removes the last column in a view after user verification.

%INCLUDE "lsconst.lss"
Sub Initialize
  Dim s As New NotesSession
  Dim view As NotesView
  Dim col As NotesViewColumn
  Set view = s.CurrentDatabase.GetView("By Category")
  Set col = view.Columns(view.ColumnCount - 1)
  If Messagebox("Position: " & col.Position & Chr(13) & _
  "Title: " & col.Title & Chr(13) & _
  "Formula: " & col.Formula, MB_YESNO, _
  "Do you want to remove this column") = IDYES Then
    Call view.RemoveColumn(view.ColumnCount)
    REM Parameter could be omitted in this case
  End If
End Sub