T
Tom Carlson
I had an extensive set of Applescripts that I used to use in Excel X. When I
switched to Excel 2004 for Mac, the scripts were rewritten automatically by
the computer. If I look at the identical files on another computer using
Excel X, they return to the way I originally wrote them. I have now started
to rewrite them for Excel 2004, but I am getting hung on trying to identify a
row and column number from the active cell. Here is the script;
tell application "Microsoft Excel"
activate
set RowNum to row of active cell
set ColNum to column of active cell
set formula r1c1 of active cell to "Comm"
set ColNum to (ColNum + 3)
set NewRange to "R" & RowNum & "C" & ColNum
select range NewRange
set formula r1c1 of active cell to "Commission—GSA"
set ColNum to (ColNum + 1)
set NewRange to "R" & RowNum & "C" & ColNum
select range NewRange
run script alias "OS X
BootOCUMENTS:AppleScripts:SigTaxScripts:SigCheckNum.scpt"
end tell
It works until I hit the line "set ColNum to (ColNum + 3)" at which point it
hangs and highlights the "3". I believe I am not getting the script to return
the row number and column number of the active cell properly. Does anyone
know how to do this, or know of any resource where I could search to discover
this? I tried the "Excel 2004 AppleScript Ref.pdf", but unfortunately it
didn't talk about this aspect.
Any suggestions would be greatly appreciated. I'd hate to have to go back to
Excel X or switch to QuicKeys when I am so close to getting it to work again.
Thanks,
Tom Carlson
switched to Excel 2004 for Mac, the scripts were rewritten automatically by
the computer. If I look at the identical files on another computer using
Excel X, they return to the way I originally wrote them. I have now started
to rewrite them for Excel 2004, but I am getting hung on trying to identify a
row and column number from the active cell. Here is the script;
tell application "Microsoft Excel"
activate
set RowNum to row of active cell
set ColNum to column of active cell
set formula r1c1 of active cell to "Comm"
set ColNum to (ColNum + 3)
set NewRange to "R" & RowNum & "C" & ColNum
select range NewRange
set formula r1c1 of active cell to "Commission—GSA"
set ColNum to (ColNum + 1)
set NewRange to "R" & RowNum & "C" & ColNum
select range NewRange
run script alias "OS X
BootOCUMENTS:AppleScripts:SigTaxScripts:SigCheckNum.scpt"
end tell
It works until I hit the line "set ColNum to (ColNum + 3)" at which point it
hangs and highlights the "3". I believe I am not getting the script to return
the row number and column number of the active cell properly. Does anyone
know how to do this, or know of any resource where I could search to discover
this? I tried the "Excel 2004 AppleScript Ref.pdf", but unfortunately it
didn't talk about this aspect.
Any suggestions would be greatly appreciated. I'd hate to have to go back to
Excel X or switch to QuicKeys when I am so close to getting it to work again.
Thanks,
Tom Carlson