[Comunit-users] Can COMUnit test Excel VBA macros?
Brought to you by:
exortech,
kimgrasman
|
From: <la...@bi...> - 2006-08-12 15:58:23
|
Hi all, Can COMUnit be used to test Excel macros written VBA? (I am not a VB programmer, so treat me gently.) I am going to be working on a several-thousand-line Excel macro that's related to an open-source medical device project. Before enhancing its functionality, I'd like to write tests for existing functionality and refactor it. The code is messy and parts of it are in bad shape. The original programmer is long gone, so I have no help getting started. When programming macros in Excel, you don't use Visual Studio. There's a different development environment that comes up. I can how to make a "reference" to the COMUnit in the Excel VBA project, but I don't know how to invoke a function to, for example, bring up the testing UI. Nor do I know how to write a test - it appears that some sort of inheritance of classes in involved (so perhaps this is a simple VB question - perhaps I just don't know the syntax I need to use, and an example would be sufficient to get me started). Is what I'm trying to do even sensible? Any help, hints, examples, etc. would be greatly appreciated if they allow me to determine whether I can use COMUnit to do unit testing on Excel macros without becoming a complet= e COM and VB expert first. Thanks, -Larry Beaty |