Spreadsheet.AddCases

This function adds the specified number of cases to the spreadsheet.

Syntax Parameters Return Value
Sub Spreadsheet.AddCases( _
    After As Integer, _
    HowMany As Integer)
  • After [in]

Long value specifying after which case the new cases should be added to.

Type: Integer

  • HowMany [in]

How many cases are to be added.

Type: Integer

This function does not return a value.

SVB Example

Adding cases and variables to a spreadsheet:

Option Base 1
Option Explicit
Sub Main
    Dim spr As Spreadsheet
    'assigns the active spreadsheet to the object spr
    Set spr = ActiveSpreadsheet
    'adds 4 cases to the spreadsheet after case 10
    spr.AddCases(10,4)
    'adds 4 variables to the spreadsheet after variable 10
    spr.AddVariables("New Variables", 10,4, scText, 20)
End Sub