none
vba language RRS feed

  • Question

  • HI

    I have a question about VBA language in Microsoft Office 

    VBA language is slower compared to other language like c# or C++ , is will be improvement in vba language in office 2016 to speed up it more ? thank you

    Friday, May 22, 2015 8:15 AM

All replies

  • The reason why VBA is slower, in many cases but not in all, is that the compiler does a lot of things automatically what you have to do manually in C, resp. isn't allowed in C.That seems to be a disadvantage, but it isn't.

    VBA is, unlike C, very easy to learn. And even a beginner can write simple programs without any programming knowledge. This is why VBA and thus Office is so common.

    Therefore IMHO there is no change within future releases.

    On the other hand, when you apply VBA properly, then you will see it's not that much slower than C. And it is also possible to write bad slow programs in C. ;-)

    Andreas.

    Friday, May 22, 2015 11:36 AM
  • What Andreas said . . .

    + VBA is no longer supported by Microsoft, so you shouldn't expect to see any changes, probably ever.  I think Microsoft will copy everything over for the next release of Office, but I don't see them changing, updating, or improving anything at all.


    Knowledge is the only thing that I can give you, and still retain, and we are both better off for it.

    Tuesday, May 26, 2015 4:51 PM
  • Hi

    This is the forum to discuss questions about Microsoft Excel develop (Excel customization). For your question is about VBA language, I am moving the thread to the MSDN forum for VBA

    The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us.

    Thank you for your understanding.

    Best Regards,

    Lan


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Wednesday, May 27, 2015 7:53 AM
    Moderator
  • VBA is supported, otherwise it would be removed. It isn't likely that the VBA editor will be improved or worked upon, unfortunately.

    VBA can be faster than C#/VB.Net. VBA runs in the same process as its host language whilst C# add-ins run in a separate process. So for example an Add-in to read many individual cells in Excel is runs slower than VBA because every cell read involves an inter-process transaction and they are slow.

    I have never found VBA to be too slow and I've written VBA that runs on large spreadsheet, Microsoft Project files and SQL Server databases.What VBA have you found too slow?

    VBA does have limitations but as a tool for a power user it is superb. There is far too much mission critical code running on way too many PCs belonging to many influential power users/managers for Microsoft to ever get rid of VBA without a major re-write of VSTO first!


    Rod Gill
    Author of the one and only Project VBA Book
    www.project-systems.co.nz

    • Proposed as answer by Wouter Defour Wednesday, May 27, 2015 1:10 PM
    Wednesday, May 27, 2015 9:41 AM
  • I wrote a complex optimization routine in VBA.  I wanted to display the results in Excel and allow users the capability to modify the presentation of the results.  Depending on the setup it could run for 8+ hours.  I wrote a limited version of it in Ruby and it was maybe 10-20% faster but it had no capability to modify the presentation.   C# is a very powerful language and can do things VBA can't.  VBA does excellent at controlling Office products but it shouldn't be considered a general purpose programming language.  For example I really like Ruby for its object oriented approach and its ability to define data types.  I really like Javascript and Microsoft's Typescript for manipulating web pages.   My friend loves Python and does everything he can in it.  Another friend loves LISP and uses it despite its lack of support and lack of anyone knowing how it works.  Each language has its own merits.  Microsoft would have a major revolt if it terminated support for VBA. 
    Wednesday, May 27, 2015 1:08 PM