Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Fillmore

macrumors newbie
Original poster
Aug 2, 2007
6
0
Hi,

I have a simple 2-page VBA macro I wrote in Excel 2003 (Windows). I’ll soon be moving to the Mac environment and would like to retain this functionality. The simplest option is to use Excel 2004 and adapt the macro as needed. But since I do run this macro on a lot of data and therefore spend a while each week waiting for it to be done, I thought it might be a good idea to explore the additional programming options available on the Mac and possibly write a faster version with a more suitable language.

First, let me state that I’m no programmer. But still, I learn the codes I need fairly quickly and would thus enjoy investing some time learning if the result is worth it.

I used VBA because it was readily available (and free). But the data to be analyzed doesn’t really have to reside in Excel; it could be stored in a simple text file the new program would access, and the program’s output could be written to such a file too. The program doesn’t use any Excel functions, as it simply checks for the presence of certain attributes in each piece of data and writes a note about it. So per se, the program is quite simple. It just takes quite some time to run it on a large amount of data. Would using AppleScript or Xcode (or something else) be likely to spawn a faster program than VBA? How accessible (difficult to learn) would this be compared to VBA?

Another issue to increase speed is multi-threading (if the program is run on a multi-core system of course). I guess no program I’d write would be multi-core capable right out of the box. My (very basic) understanding of this issue is that multi-threading must be implemented by the programmer, and that it’s a challenge even for professionals. Am I right? Would that be something worth tackling with, or would that be too big a challenge for me?

I would appreciate any thoughts on this.

Thanks in advance!
 

Boghog

macrumors member
May 7, 2007
89
0
Other people will be able to tell you more about XCode. Just generally it sounds as if VBA was not the perfect means to acchieve your end.
A word of warning though: The Mac version of MS Office (2004 and 2008) does not support VBA. Recent rumors have said that the next gen will re-introduce it.
An alternative could be NeoOffice (the Mac version of OpenOffice) which runs MS Office documents with simple VBA-macros perfectly. Don't ask me about speeds, though.
XCode or RealBasic may be a better solution for you.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.