Re: Excel: newby question
Re: Excel: newby question
- Subject: Re: Excel: newby question
- From: David Wignall <email@hidden>
- Date: Sat, 04 May 2002 14:05:38 +1200
on 4/5/02 2:40 am, Paul Berkowitz at email@hidden wrote:
>
On 5/3/02 6:44 AM, "Olivier Berquin" <email@hidden> wrote:
>
>
> Hi all,
>
>
>
> How can I have the "LastCell" in Excel?
<snip>
>
> What's the "range" ? What's the direction ?
>
>
>
>
>
Try
>
>
tell application "Microsoft Excel"
>
set TheLastOnt to SpecialCells (UsedRange of ActiveSheet) Type
>
xlLastCell
>
end tell
>
>
--> Range "R188C13" of Worksheet "Sheet1" of Workbook "Name Here""
>
>
>
That gets you the range. I'm not sure what you mean by the "direction".
Perhaps something like
set TheLastOnt to (LastCell Direction xlDown) of CurrentRegion of Range
("R1C1") -- or (RxCy) or Selection
is what you're after?
Interesting results recording the cmd-down arrow method:
tell application "Microsoft Excel"
+event miscdosc; "SELECT.END(4)"
end tell
The number corresponds to the xldirection constant; the purpose of the do
script eludes me.
--
fwiw
Dave
_______________________________________________
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.