Re: Excel: newby question (bis)
Re: Excel: newby question (bis)
- Subject: Re: Excel: newby question (bis)
- From: Shane Stanley <email@hidden>
- Date: Mon, 06 May 2002 18:25:17 +1000
On 6/5/02 6:15 PM +1000, Paul Berkowitz, email@hidden, wrote:
>
Well, you said you wanted the range of the last cell. You didn't say you
>
wanted the last row number. Which do you actually want?
>
>
tell application "Microsoft Excel"
>
set ur to UsedRange of ActiveSheet
>
set rr to (count Rows of ur) -- last row number
>
end tell
>
>
(If, unusually, the used range doesn't begin with the first row - if there
>
are any blank rows at the top, that is - you can find out which row is the
>
first of the used range, then add that, less 1, to rr:
>
>
set r to Row of ur
>
set lastRowNum to (r - 1 + rr)
>
)
Do these still work?
tell application "Microsoft Excel"
tell Worksheet 1
Row of last Row of UsedRange -- number of last row
last Row of UsedRange -- reference to last row
end tell
end tell
--
Shane Stanley, email@hidden
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.