Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Should I use Python in stead of VBA? [closed]

I am been building a demo (and potentially a small application) for a financial accounting model. I am using VBA/Excel for data input (eg with forms), calculations and presentation of results and I am also running SQL-questions to MS Access database from the VBA program. In principle, the functionality of these components serve me fairly well (I realize that VBA is a bit ouot dated and not the smoothest). I have been doing this for some time now (and I am engineer with some ancient experience of other languages, although never worked as a programmer) and fell pretty much on top of things and seem to be able to find the programming errors I make. However, I tend to go mad at VBA when faults occur that really don't seem to be caused by me, but due instability/shortcomings with VBA.

So my question is, being completely inexperiened with Python: could I basically do with Python that I descibed above? Could you give me an idea of whether Python is more stable and less "error prone" than VBA/Excel? (am using Windows 7) Grateful for advice

like image 807
user1164822 Avatar asked Dec 12 '22 06:12

user1164822


1 Answers

If you decide to use Python to drive automation of Office applications, look into Python Win32 Extensions

However, I'm skeptical that is advisable. It would require you to install and learn Python. And if this is an application you distribute to users, they would need Python installed as well.

Furthermore the example you provided about declaring variables suggests your time would be better spent learning VBA and the object models of the Office applications you want to automate. In that example, you misinterpreted your lack of understanding of VBA fundamentals as "VBA is error prone". Python won't help you with that.

like image 72
HansUp Avatar answered Dec 26 '22 14:12

HansUp