Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
C++ instead of VB for excel macros
I'm running 50,000 scenarios in a VB macro that involves looping through a 90 x 90 array. It takes 3 hours to run -- after implementing the macro speed-up tips I've received. I'm thinking about learning C++ to build a faster addin. Any comments on whether this is worthwhile? Or how much I should be able to cut the run time?
-- GP |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
C++ instead of VB for excel macros
"Rimcon" wrote in message ... I'm running 50,000 scenarios in a VB macro that involves looping through a 90 x 90 array. It takes 3 hours to run -- after implementing the macro speed-up tips I've received. I'm thinking about learning C++ to build a faster addin. Any comments on whether this is worthwhile? Or how much I should be able to cut the run time? -- GP Depends what the scenarios are doing. If you are using Excel functions you are unlikely to see a significant improvement in speed. The C++ code may well execute faster but the OLE calls still have to go through the same interfaces and the same Excel funcions are called. If you re-write the functions in C++ you may see an increase in performance but I'd only advise that if you are an experience C++ developer. If not you may want to consider used VB.net or C# which IMHO are easier to learn for the experienced VB programmer. I'm currently doing something similar though in my case its the factor of running out of memory in Excel and security of the code more than speed thats driving it. I dont know what tips you have been given but turning off events, screenupdating and autocalculation all give more significant speed advantages than simply compiling the VBA code in my experience. Keith ----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==---- http://www.newsfeed.com The #1 Newsgroup Service in the World! 100,000 Newsgroups ---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =--- |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel 2007 macros - how to merge 5 macros together into one | Excel Discussion (Misc queries) | |||
Training: More on how to use macros in Excel: Recording Macros | Excel Worksheet Functions | |||
Making excel macros run Word macros | Excel Programming | |||
Macro Size Limit / open macros with macros? | Excel Programming | |||
Suppress the Disable Macros / Enable Macros Dialog | Excel Programming |