Microsoft KB Archive/80370

{|
 * width="100%"|

Excel: Macro Error Using Split Function if Range Off Screen

 * }

-

The information in this article applies to:


 * Microsoft Excel for Windows, versions 2.x, 3.0, 4.0, 4.0a, 5.0
 * Microsoft Excel for OS/2 versions 2.2, 2.21, and 3.0

-

SUMMARY
When using the Split command in Microsoft Excel, where the column split or the row split refers to an area off the visible screen, a macro error will occur. It is not possible to manually set a split off the visible screen; nor is it possible to do this in a macro. This is by design.

Steps to Reproduce the Macro Error
  Enter the following on a macro sheet:

     A1:=Split(1,1)          B1:=Split(250,2500) A2:=Return           B2:=Return  Select A1. From the Macro menu, choose Run. Choose OK. A split will occur after column 1 and row 1. Select B1. From the Macro menu, choose Run. Choose OK.

A macro error will occur because the column 250 and row 2500 are off the screen.