[python-win32] Visual Basic

Tim Roberts timr at probo.com
Mon Feb 6 18:59:26 CET 2006


Speers, Ted wrote:

> 
>- -All of my VBA code is "within Excel."  Sorry for the confusion.  I don't know any better.
>  
>

I wondered about that, and I probably should have clarified it before I
responded.  VBA forms are just Excel objects, and should be able to be
manipulated using the Excel object model from Python.  I thought there
was a "Forms" collection in the Excel application or workbook objects,
but in a few minutes of experimentation, I cannot find it, and the word
"form" is so common that Google is nearly worthless.

>- -Your next statement hints at a solution to my contortions.  All I really want VB for is the damn widgets.  When I first looked at Python more than a year ago, I spent quite a bit of time looking for a way to easily design and use widgets with Python and I found nothing easy to use or even comprehensible.  I'm hoping your wxPython reference is the answer ... I have not heard of it before.
>  
>

This was my mistake, actually.  I subscribe to both the "pywin32" list
and the "wxPython" list, and when I saw your message, I had a moment of
disorientation.  I thought you were posting to the wxPython list, which
is why I was so confused as to why you'd want to manipulate VB code,
instead of rewriting it!

It is quite possible that wxPython may solve your problem, but it really
depends on what you're doing.  The nice thing about VBA is that it
executed entirely inside Excel.  With wxPython, you would have a
separate program, controlling and interacting with Excel.  Quite
workable, but you'll have to decide how appropriate for your situation.

-- 
Tim Roberts, timr at probo.com
Providenza & Boekelheide, Inc.



More information about the Python-win32 mailing list