Line Input and Input into arrays

Boy, does Excel X hate this one (which works fine on Excel 2000):
[vba]Dim TempData as variant, n as integer

ReDim Tempdata(1 to whatever)

open newfile for input as #1

Line input #1, TempData(1)

for n = 2 to whatever
input #1, TempData(n)
next n[/vba]

The Line Input and Input statements give a 'Compile Error: Variable required - can't assign to this expression' or a 'Can't assign to array' error, or just cause Excel to quit.

The solution? Input or Line Input into a non-array variable, and then assign the array element to the first variable.