RickGreg said:
Jim-
Back to my original question.... Nearly all the VBA-driven Excel files I
create are cross-platform. Does apple-scripting carry over to Windows
Excel? Or is C# my only future option (as far as you can see right now)?
Huge bummer, and big dent for cross-platformers like me.
Thx. -Rick
Hi Rick,
AppleScript is Mac only.
As for the future I see nothing is certain. When Microsoft announced
that VBA would not be supported there was an immediate backlash by VBA
developers, which caused Microsoft folks to think twice about their
decision, or at least the timetable for implementation.
So far Microsoft has not withdrawn the announcement that at some point
VBA support will end. But no cut-off date has been announced, either, so
Microsoft can keep their options open.
It's entirely possible that no decision about "when" has been made yet,
and certainly no news release about it has been made. Without a crystal
ball you and I can only guess when and/or if VBA going away will or
won't happen.
It could turn out the way Bob hints: VBA code will continue to work
with Office in the future, but the default programming environment could
change to some other programming language.
There are a zillion unknowns to consider. How will Windows and Apple's
upcoming Leopard interact? Might it be possible someday to run Visual
Studio on a Mac (within a Windows environment) and use that as the
developer interface for Mac Office somehow? Will AppleScript be able to
make compiled Code for Windows versions of Office? Stranger things have
happened.
My point is that VBA is likely to go away. There are hundreds of
possible scenarios for the future. Be ready for some big changes with
regard to office programmability for both Mac and PC. My hunch is that
whatever programming language becomes the default that the Mac and PC
versions of Office will have somewhat better cross-platform capabilities
than they do now. Keep in mind that Mac Office and Windows Office now
and in the future each have unique capabilities, so not everything will
always work on each platform.
So for now, it's OK to use VBA as your developer language. Much of what
you learn will still be applicable to whatever language takes its place.
Office will still have objects, methods, properties, actions, etc, but
you will get at them with different syntax sometime in the future.
Stick with VBA version 5 (that's the one supported on the Mac). Avoid
Active-X as if it were the plague and don't use anything that was new in
VBA 6 (there's work-arounds for the few new things). Try your code on
both Mac and Windows versions of Office. When something doesn't seem to
work as expected just post your code here and ask for help.
I don't want to discourage you from getting started on programming. Go
for it. Just keep an eye on what Microsoft is doing. Invest in learning
about Office objects, properties, methods etc and don't concentrate too
much on learning VBA syntax and the VBA editor more than what you need
to accomplish your immediate programming goals.
-Jim Gordon
Mac MVP