Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
General
GeneralPortable MacsHardwareNetworking
Applications
Mac ApplicationsEudoraFirefox / MozillaInternet ExplorerOutlook ExpressMS OfficeEntourageExcelPowerPointWordVirtual PCMedia PlayerOther MS Products
Programming
Mac ProgrammingCodeWarriorPerl
Country Specific
Australian Mac GroupUK Mac Group

Mac Forum / Applications / Excel / May 2007



Tip: Looking for answers? Try searching our database.

Is there a way to get generic application objects in Applescript that exist in Excel?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
gimme_this_gimme_that@yahoo.com - 29 May 2007 04:45 GMT
For example ...

I'd like to translate this VBA macro:

Sub nn()
   Workbooks.Open Filename:=Application.TemplatesPath + "Home
Essentials:Finance Tools:Car Lease vs Purchase"
End Sub

To Applescript:

tell application "Microsoft Excel"
        set wkbk to open workbook file name     TemplatesPath & "Home
Essentials:Finance Tools:Car Lease vs Purchase"
end tell

I can use the actual value of Application.TemplatePath to open the
file ... I'm mostly interested in knowing how to access Application
objects that I know are available via VBA that might not be
documented.

Thanks.
Dave Balderstone - 29 May 2007 04:50 GMT
> For example ...
>
[quoted text clipped - 16 lines]
> objects that I know are available via VBA that might not be
> documented.

See <http://www.mactech.com/vba-transition-guide/>
gimme_this_gimme_that@yahoo.com - 29 May 2007 05:10 GMT
Yeah, everyone and their brother is going to point to that article. It
probably does more harm than good. Don't get me wrong it's a good
article. But frankly it's not enough to get you started on Excel.
(One page devoted to working cell assignments on a range? Come on!)

Here is the trick (not in the article)

It turns out that template path is in the dictionary -

tell application "Microsoft Excel"
    set wrkbk to open workbook workbook file name (get templates path) &
"Home Essentials:Finance Tools:Car Lease vs Purchase"
end tell
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.