An open community 
of Macintosh users,
for Macintosh users.

FineTunedMac Dashboard widget now available! Download Here

Previous Thread
Next Thread
Print Thread
Problem w/ AppleScript & Automator on Excel 2008
#12808 11/17/10 11:01 PM
Joined: Aug 2009
JoBoy Offline OP
OP Offline

Joined: Aug 2009
I'm a non-programmer. I need to automate a simple process in Excel where I copy a formula's numerical value from one cell and "paste special" into a different cell after I select the "values" and "multiply" radio buttons in "paste special." I've tried to get AppleScript and also Automator to do this job by recording my keystrokes, but neither one will record them so that I get the result I want. In fact, I can't seem to get AppleScript to record anything. I have Excel 2008. Will either of these apps do what I want if I can find the required instructions somewhere?

Last edited by JoBoy; 11/18/10 03:49 AM.

Mac Pro dual Quad-Core Intel Xeons Early 2008; 16GB RAM; MacOS X 10.11.6, iOS 9.3.5
Re: Problem w/ AppleScript & Automator on Excel 2008
JoBoy #12837 11/22/10 12:50 AM
Joined: Aug 2009
Likes: 3
Moderator
Offline
Moderator

Joined: Aug 2009
Likes: 3

The recording function of Script Editor is pretty much non-existent in OS X, except for Finder (and even that's pretty flakey). I don't use Excel, so I can't give you any concrete suggestions, but Excel 2004 AppleScript Reference (<<pdf which seems to insist on downloading rather than displaying within Safari, regardless of pref setting) is a comprehensive (462-page) manual, much of which is probably applicable to Excel 2008 as well.



dkmarsh—member, FineTunedMac Co-op Board of Directors
Re: Problem w/ AppleScript & Automator on Excel 2008
dkmarsh #12838 11/22/10 01:13 AM
Joined: Aug 2009
JoBoy Offline OP
OP Offline

Joined: Aug 2009
Originally Posted By: dkmarsh

The recording function of Script Editor is pretty much non-existent in OS X, except for Finder (and even that's pretty flakey)...


If it's non-existent in OS X, does that mean it's being phased out by failure to maintain it until nobody wants to use it? I hate to invest in something that has no future. BTW, the link that you provided for the Excel 2004 AppleScript Reference downloaded in less than 10 seconds. That's pretty good for 1.8MB over the Internet. I'll see if it provides me with a way to get the job done.

Is there anything similar to this reference if I want to use Automator instead of AppleScript?

Thanks a lot for your response and suggestions. They're very much appreciated. smile

P.S. How tough is it for a non-programmer to become reasonably competent using Visual Basic? That seems to be what Microsoft wants us to use on Excel 2008. Visual Basic is also mentioned frequently in the pages I've looked at in the Excel 2004 AppleScript Reference to which you referred me.

Last edited by JoBoy; 11/22/10 01:43 AM.

Mac Pro dual Quad-Core Intel Xeons Early 2008; 16GB RAM; MacOS X 10.11.6, iOS 9.3.5
Re: Problem w/ AppleScript & Automator on Excel 2008
JoBoy #12839 11/22/10 02:50 AM
Joined: Aug 2009
Likes: 1
Moderator
Offline
Moderator

Joined: Aug 2009
Likes: 1
Originally Posted By: JoBoy
P.S. ... [Visual Basic] seems to be what Microsoft wants us to use on Excel 2008. Visual Basic is also mentioned frequently in the pages I've looked at in the Excel 2004 AppleScript Reference to which you referred me.

The pdf DK linked to was made available by Microsoft after it had eliminated Visual Basic from Office for Mac in the transition from Office 2004 to Office 2008. The ensuing protests were loud enough for MS to provide some relief via AppleScript, and to re-introduce VB in Office 2011.


alternaut moderator
Re: Problem w/ AppleScript & Automator on Excel 2008
alternaut #12840 11/22/10 06:41 AM
Joined: Aug 2009
JoBoy Offline OP
OP Offline

Joined: Aug 2009
Ooops! That's right. I should have said 2011 instead of 2008. My mistake. I now have 2008 and was trying to make something happen with AppleScript, but found that I couldn't do it. I have no background in AppleScript. I then asked about the degree of difficulty in learning Visual Basic, but I intended to mean "for use in Excel 2011." I'd be willing to purchase 2011 if learning Visual Basic is not a huge mountain to climb for a non-programmer.


Mac Pro dual Quad-Core Intel Xeons Early 2008; 16GB RAM; MacOS X 10.11.6, iOS 9.3.5
Re: Problem w/ AppleScript & Automator on Excel 2008
JoBoy #12848 11/22/10 02:45 PM
Joined: Aug 2009
Likes: 16
Moderator
Offline
Moderator

Joined: Aug 2009
Likes: 16
Originally Posted By: joboy
I'd be willing to purchase 2011 if learning Visual Basic is not a huge mountain to climb for a non-programmer.

After many years of teaching various aspects of software design, programming, etc. at the college freshman to engineering professionals I think it is safe to say the steepness of the hill depends in very large part on the individual. My suggestion would be to get a copy of something like Visual Basic for Dummies or even better and more to the point Excel VBA for Dummies from the library or bookstore to read. After that you would be in a position to make a better judgement of how high your personal learning curve would be than anyone else can possibly guesstimate. Even if you have to buy the Dummies Guide, $20 is not a bad investment before making a much more substantial investment in Office 2011 for Mac.


If we knew what it was we were doing, it wouldn't be called research, would it?

— Albert Einstein
Re: Problem w/ AppleScript & Automator on Excel 2008
joemikeb #12850 11/22/10 03:45 PM
Joined: Aug 2009
JoBoy Offline OP
OP Offline

Joined: Aug 2009
That's excellent advice. Thank you. I 'll check it out. An answer to one question would be very helpful immediately: Is there any kind of recording feature in Visual Basic for Excel 2011 that would enable me to record a few simple moves such as copy and then paste special (values, multiply)? That would solve an immediate need. Then I could proceed with the general learning experience without undue pressure. I tried to do that one with AppleScript in Excel 2008, but gave up.

Last edited by JoBoy; 11/22/10 05:13 PM.

Mac Pro dual Quad-Core Intel Xeons Early 2008; 16GB RAM; MacOS X 10.11.6, iOS 9.3.5
Re: Problem w/ AppleScript & Automator on Excel 2008
JoBoy #12855 11/22/10 09:08 PM
Joined: Aug 2009
Likes: 8
Offline

Joined: Aug 2009
Likes: 8
Don't know about recording features in Visual Basic, but there are many applications that can record key strokes, etc. within other applications (e.g., QuicKeys to name just one).

In the long run it may be easier (and cheaper?) to get one of these instead of going with Visual Basic or something else that is internal to Excel.


On a Mac since 1984.
Currently: 24" M1 iMac, M2 Pro Mac mini with 27" BenQ monitor, M2 Macbook Air, MacOS 14.x; iPhones, iPods (yes, still) and iPads.
Re: Problem w/ AppleScript & Automator on Excel 2008
Ira L #12856 11/23/10 02:12 AM
Joined: Aug 2009
JoBoy Offline OP
OP Offline

Joined: Aug 2009
I used to have QuicKeys, but I quit using it when OS X came along. I've cut way back on my small-developer software and it has improved the stability and reliability of my setup.

I just downloaded QK and will try it out. Again, thanks for the suggestion.


Mac Pro dual Quad-Core Intel Xeons Early 2008; 16GB RAM; MacOS X 10.11.6, iOS 9.3.5

Moderated by  alternaut, dianne, dkmarsh 

Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.4
(Release build 20200307)
Responsive Width:

PHP: 7.4.33 Page Time: 0.023s Queries: 32 (0.017s) Memory: 0.6116 MB (Peak: 0.6986 MB) Data Comp: Zlib Server Time: 2024-03-28 12:36:25 UTC
Valid HTML 5 and Valid CSS