Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default Applescript: get range of selection

Hopefully someone can help me, because if not I will not be able to migrate
my current collection of Applescripts to work with either Excel 2004 or Excel
2008 (I've been using Excel X because it still works).

So, this seems so simple that it should be obvious, but it's not. I've tried
just about everything, and my colleagues and I cannot come to a solution. I
want to get the range (preferably in "A1" format) of the currently selected
cell. That's it. Whether it's a range object or text, it doesn't matter. I
need to have the range itself to be able to pass to other functions and use
elsewhere after it is asked for. I can't simply always refer to the
selection. In fact, many of my scripts work much faster when I don't always
select the cell I want to work with. Here's the code snippet:

tell application "Microsoft Excel"
set rangeA1 to range of selection
return rangeA1
end tell

I always end up with a "missing value". I realize it is possible to get the
row and column, but many of Excel's commands after Excel X don't like R1C1
format for ranges.

Any help is appreciated. Thanks!
-Richard
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to record Excel with AppleScript? Recordable or not? ChipMck Excel Discussion (Misc queries) 0 June 27th 08 01:39 AM
Narrow Range based on Selection in Another Range David Excel Discussion (Misc queries) 3 July 1st 07 05:12 PM
Identifying a selection of a selection of a range swimfast Excel Worksheet Functions 1 March 1st 07 02:51 AM
Range Selection cfspahn24 Excel Discussion (Misc queries) 3 April 14th 06 01:29 PM
Selection Range ch Excel Discussion (Misc queries) 5 July 15th 05 05:50 AM


All times are GMT +1. The time now is 09:36 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"