Rewriting vba in vb6

Last Edited By Krjb Donovan
Last Updated: Mar 05, 2014 09:53 PM GMT

Please your advice if this will be only to save enough protection for my codes.


You can copy 99 percent of the VBA code to VB6. All you have to do after that is ensure you are "talking" with the right objects. In VB6, the Application object and many objects ofyou would normally address directly (ActiveCell for example) will cause compile errors. You have to pre-pend those with a global object variable that holds the current instance of theapplication. So objects like that will change from:

ActiveCell.Value=10 to: gxlApp.ActiveCell.Value=10

Where gxlApp is the globalobject variable which gets instantiated in the xlConnect designer's module.

Note that people using 64 bit Office 2010 cannot use VB6 add-ins!


©2024 eLuminary LLC. All rights reserved.