Example
The following example selects three blocks of cells: A1 to B2, A4 to B6, and D1 to E3.
C++
m_Spread1.AllowMultiBlocks(TRUE)
m_Spread1.SetSelection(1, 1, 2, 2);
m_Spread1.AddSelection(1, 4, 2, 6);
m_Spread1.AddSelection(4, 1, 5, 3);
Visual Basic
fpSpread1.AllowMultiBlocks = True
fpSpread1.SetSelection 1, 1, 2, 2
fpSpread1.AddSelection 1, 4, 2, 6
fpSpread1.AddSelection 4, 1, 5, 3