p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   Excel VBA (http://p2p.wrox.com/forumdisplay.php?f=79)
-   -   VBA vs. Visual Studio --- which is better? (http://p2p.wrox.com/showthread.php?t=63860)

lovNexcel November 18th, 2007 04:46 PM

VBA vs. Visual Studio --- which is better?
 
Hi all,
First, my apologies if this is not the right forum..

I am using my spare time to learn how to create macros (for the first time) in Excel and Powerpoint in order to the use the programs more efficiently (since I spend way too much time on the them :)

I am SOOOO confused as to what the scoop is with VBA vs. VB net vs Visual Studios? Is there an expert that can provide me with some guidance given that:
--> I am new to programming and only intend to learn code in order to create macros in Excel & Powerpoint

Here are my questions:
1) Which programming language should I invest my time to learn if you were in my situation? This is complicated by the fact that most corporations do are not using Office 2007 and (from my experience) are utilzing Excel 2003
2) If I choose to learn Visual Studio or VBA 2007, will my knowledge of the language enable me to use Excel 2003?
3) If I create a macro in (for eg.) excel 2007, will it run in excel 2003?

Thanks so much for your help!!!!!

Excel rocks!



allenm November 26th, 2007 12:55 PM

1) If you're only going to code macros then it is far cheaper to go with VBA... it comes with MS Office and is a little easier to learn / use with office. If you wish do do more coding than just office macros then you will probably want to invest in Visual Studio. Some coding experience will transfer between VBA and the VB code in Visual Studio, but Visual Studio is a full coding environment platform meant to code desktop applications. The learning curve is much steeper due to it's greater versatility.

2) Visual Studio will not necessarily help you in use of Excel (any flavor). VBA code will because it only works within MS Office. So to code VBA you will have MS Excel open. VBA also gives you a greater understanding on how Excel works because it deals mostly with manipulation of data and ranges within Excel. Visual Studio doesn't focus solely on Office so would be less advantageous to learning Excel.

3) Not all Excel 2007 VBA will necessarily work for previous versions. Understanding that, most of the code will translate without need to recode any of it. If you program a VBA macro in previous versions of Excel then they almost always (No, not always, there are always exceptions) work with newer versions. The primary reason why Excel 2007 code might not work with an earlier version is if you use newer syntax or object(s) not available in previous versions.

Hope this helped.



All times are GMT -4. The time now is 05:49 PM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.