View previous topic :: View next topic |
Author |
Message |
HowardBrazee Blue Pill
Joined: Aug 09, 2010 Posts: 3
|
Posted: Wed Aug 11, 2010 7:39 am Post subject: VB macros |
|
What are the plans for supporting VB macros? I'd dearly love to not need Windows for most of my Excel spreadsheets. |
|
Back to top |
|
|
pluby The Architect
Joined: Jun 16, 2003 Posts: 11949
|
Posted: Wed Aug 11, 2010 8:24 am Post subject: |
|
NeoOffice does have some support for Excel VBA macros. However, the support is very limited and tends to only work properly for very very simple macros. There is also one other limitation: while you can edit VBA macros in NeoOffice's macro editor, you cannot save your macro changes and only the original macros will be saved when you save the file.
The reason for these limitations is that Excel VBA is essentially a proprietary programming language create by Microsoft while NeoOffice is based on OpenOffice.org which has its own indendepently developed macro language called Basic. So for NeoOffice to run Excel VBA macros, it basically has to translate Excel VBA macros to its own internal Basic macro language and then execute the translated Basic macros.
That may sound simple, but the languages how very little common syntax so many Excel VBA commands have no directly matching set of Basic commands. Essentially, translating Excel VBA to Basic is like translating Japanese to English with automatic translation software. You may understand most of the translated wordings, but it will be very hard to read and some of the translation may make no sense.
So what can you do? The bad news is that the real problem here is that your spreadsheets are dependent on Excel VBA and since Excel VBA only works properly in Excel for Windows, the options available to you are limited to the following. Unfortunately, none of these options are easy or cheap. The first requires money but limited time whereas the second and third options require lots of time:
1. Excel for Mac - If NeoOffice cannot easily translate your Excel VBA macros and proper operation of those macros is very important for you, the safest bet is to buy a copy of Office 2004 for Mac. Buying the "2004" edition is critical because Microsoft removed VBA support in Office 2008.
2. Run Windows on your Mac - If you already have Windows and Office for Windows licenses and you have an Intel Mac (that is, any Mac machine built in the last few years), you can run Windows in a window on your Mac using free software such as VirtualBox.
3. Reimplement your macros in Basic - You can save your spreadsheet as a native Calc .ods file and then slowly work through each of your macros and reimplement them in Basic. The big disadvantage here is that Calc .ods files are not readable by Excel but Windows users can read your .ods files using OpenOffice.org.
Hope that helps.
Patrick |
|
Back to top |
|
|
ovvldc Captain Naiobi
Joined: Sep 13, 2004 Posts: 2352 Location: Zürich, CH
|
Posted: Wed Aug 11, 2010 12:02 pm Post subject: |
|
4. Run Office for Windows on your Mac using Wine or Crossover. The big advantage here is that you can run Windows Software without Windos, though not everything works seamlessly.
5. Wait until Office 2011 comes out, which will reportedly reinstate support for VBA on Office for Mac..
Just for completeness' sake .
Best wishes,
Oscar _________________ "What do you think of Western Civilization?"
"I think it would be a good idea!"
- Mohandas Karamchand Gandhi |
|
Back to top |
|
|
yoxi Cipher
Joined: Sep 07, 2004 Posts: 1799 Location: Dawlish, Devon
|
Posted: Wed Aug 11, 2010 12:35 pm Post subject: |
|
6. write (an (entire (OS and (office (package (using (lisp)))))))
Disclaimer: ((this is a) joke) |
|
Back to top |
|
|
pluby The Architect
Joined: Jun 16, 2003 Posts: 11949
|
Posted: Wed Aug 11, 2010 1:05 pm Post subject: |
|
yoxi wrote: | 6. write (an (entire (OS and (office (package (using (lisp)))))))
Disclaimer: ((this is a) joke) |
Sadly, I think Microsoft used a variant of this logic when they dropped VBA from Office 2008 for Mac. The problem, of course, is that just because AppleScript is a native scripting language on Mac OS X, spreadsheets that used to work in both Windows and Mac versions of Excel can now only work in one platform and never both.
I don't know how that made sense to the powers that be at Microsoft so I can only conjecture that the dropping of VBA in Office for Mac was because Microsoft was having trouble getting their Mac OS X code to work on Intel chips and, instead of holding up shipment until that work was done, they used the "port your macros to AppleScript" spin.
Patrick |
|
Back to top |
|
|
HowardBrazee Blue Pill
Joined: Aug 09, 2010 Posts: 3
|
Posted: Thu Aug 12, 2010 7:19 am Post subject: |
|
I have Parallels and Crossover, but the only thing I run on Crossover is Forte Agent. My home version of Office doesn't run the Excel spreadsheets I need though. So I log onto work to use them. I'm retiring at the end of the year and will lose that option.
Since I need to share these spreadsheets with Windows users, it appears that my options limited to upgrading Office for Windows or upgrading Office of OSX (provided it works as promised).
Thanks for the input. |
|
Back to top |
|
|
ovvldc Captain Naiobi
Joined: Sep 13, 2004 Posts: 2352 Location: Zürich, CH
|
Posted: Thu Aug 12, 2010 12:56 pm Post subject: |
|
Well, as said, Office 2011, which will come out at the end of the year, should restore VBA support to macs.
So you could hold off and do that. But parallels or crossover is much cheaper if you already have them.
I am surprised that the home version doesn't run the sheets. Is that because you have 2003 at home and 2007 at work? Otherwise, I thought that Excel was pretty much the same regardless of the edition..
Best wishes,
Oscar _________________ "What do you think of Western Civilization?"
"I think it would be a good idea!"
- Mohandas Karamchand Gandhi |
|
Back to top |
|
|
HowardBrazee Blue Pill
Joined: Aug 09, 2010 Posts: 3
|
Posted: Fri Aug 13, 2010 8:13 am Post subject: |
|
ovvldc wrote: |
I am surprised that the home version doesn't run the sheets. Is that because you have 2003 at home and 2007 at work? Otherwise, I thought that Excel was pretty much the same regardless of the edition..
Best wishes,
Oscar |
I have 2007 at work (where I am now). My home version is older, probably 2003. |
|
Back to top |
|
|
pluby The Architect
Joined: Jun 16, 2003 Posts: 11949
|
Posted: Fri Aug 13, 2010 9:03 am Post subject: |
|
HowardBrazee wrote: | I have 2007 at work (where I am now). My home version is older, probably 2003. |
Does your Excel file have an .xlsx extension in its name? If so, that would explain why your older version of Excel cannot handle the file. Older Excel files have an .xls extension and files in Excel 2007 have an .xlsx extension.
The .xlsx extension is a new format that Microsoft created that only Excel 2007 can read and the new format looks like gibberish to any Excel version released before Excel 2007.
Patrick |
|
Back to top |
|
|
|