Results 1 to 1 of 1
2004-02-19, 16:36 #1
- Join Date
- Feb 2001
- Yilgarn region of Toronto, Ontario
- Thanked 0 Times in 0 Posts
To VBA or not to VBA, that is the question (any)
This exercise crops up about once a month, on average, and to my surprise another cropped up Tuesday.
Make a list of the VBA projects you have completed (or wish to complete) and decide whether they really ought to be VBA.
1) Colleen is thinking PPT/VBA for generating charts in PPT each month from data in Excel. It may be possible to use dynamic linking to achieve her goals (ten minutes) without resorting to VBA (ten days).
2) A firm in New York asks me to convert WordPerfect macros to MSWord; I can do it, but the macros are just text-generators, and I can achieve their goals with AutoCorrect (ten minutes) instead of wading through WPM macro code and translating to VBA (ten days).
3) Colleen has a sales rep who submits results as a text file each week. Colleen will use VBA to process this transaction data, for sure ("While Not EOF(TransactionFile) ..... ReadNext; WEND).
4) Chris writes a document cleansing application in Word/VBA. naturally it is going to be VBA.
OK. "To VBA or not to VBA, that is the question".
What simple test might we apply to determine whether we should be delving into VBA to solve a problem?
Right now I'm thinking "Time-dependant data structures require a VBA solution; others do not".
1) The Excel chart data STRUCTURE does not vary from week to week. It's always cells C5 through E7. Dynamic link works here.
2) The New York firm's text is constant. Their data structure does NOT change over time. AutoCorrect works here.
3) The sales rep makes 3 sales one week, 8 the next, 5 the next. The data structure (i.e. the transaction file) varies from week to week (3 records this week, 8 records the next, 5 the next). VBA needed here.
4) Chris's application must determine how many documents are to be converted each time it runs. The size (structure) of the table of document file names, like the sales rep's transaction file, changes in time. VBA needed here.
I'll mull over this. It seems to me if the test is that simple, then programmers-of-the-world can realize that in many cases there is a built-in solution that does NOT require programming. Independent of the host application (Office, Corel, Lotus, Unix etc.)
Of course, we'll all be penniless .....