Hello again,
I was wondering if there is a way to select multiple worksheets in Excel, then perform an action on multiple cells within each of those sheets. If I were doing this by hand, I would click on the first sheet’s tab, hold the shift, then click the last sheet’s tab, then type in the value in the cell of the top sheet. All of the cells in the same range “below” that that had been selected would also get the value entered. From what I’ve read, it may not be possible to do that in AppleScript. Here is my workaround:
set MonthList to {January, February, March, April, May, June, July, August, September, October, November, December}
repeat with i from 1 to 12
set AccrueMonth to item i of MonthList
MonthlyZero(AccrueMonth)
end repeat
on MonthlyZero(AccrueMonth)
tell application "Microsoft Excel"
activate
set AccrueSheet to ("" & (AccrueMonth as text) & "")
set formula of range "C1" of sheet AccrueSheet to 0
set formula of range "B14" of sheet AccrueSheet to 0
end tell
end MonthlyZero
It works as it is supposed to, but I was wondering if there is a way to address these cells in multiple cells more “directly.”
Thanks,
Tom Carlson