Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel 2007 macros - how to merge 5 macros together into one Sue Excel Discussion (Misc queries) 1 April 16th 08 08:36 PM
Training: More on how to use macros in Excel: Recording Macros ToriT Excel Worksheet Functions 2 February 10th 06 07:05 PM
Making excel macros run Word macros Matthew McManus Excel Programming 1 February 18th 04 02:57 AM
Macro Size Limit / open macros with macros? andycharger[_7_] Excel Programming 6 February 13th 04 02:00 PM
Suppress the Disable Macros / Enable Macros Dialog Shoji Karai Excel Programming 5 September 24th 03 03:10 AM


All times are GMT +1. The time now is 11:52 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"