Greetings guys…I’m using the script below but for some reason I get the following error with it:
Any ideas? I’m using Excel 2004.
My only other question is…when you open excel, it opens some “new file” dialogue window which messes up the script, how can i have it close that or skip that window so it can just go right to my loading of my saved workbook?
set the_file to (choose file)
tell application "Microsoft Excel"
activate
open (the_file as alias)
tell worksheet 1 of workbook 1
set LN to "Doe"
set FN to "Drew"
set SEX to "Male"
set AGE to 24
set DUR to 267
set PROT to 0
set A1C to 45
set SBP to 4554
set CHOL to 2
set the_rec to {LN, FN, SEX, AGE, DUR, PROT, A1C, SBP, CHOL}
set d_rows to first row index of (get end (used range of sheet 1 of active workbook) direction toward the bottom)
set next_row to d_rows + 1
set pre_range to ("R" & next_row & "C1:R" & next_row & "C9")
set value of pre_range to the_rec
end tell
end tell
Model: Dual 2.4 GHz PowerPC G5
Browser: Internet Explorer 5.23
Operating System: Mac OS X (10.3.9)