Packaging and Reusing VBA Code in Excel
So I use Excel 2007 .xltm templates with data connections to SQL Server to pull report tables. Each file has a handful of VBA functions to manage refreshing, disconnecting, formatting, user input, etc. I have 50+ .xltms with the same set of modules, so its quite cumbersome to make changes t开发者_运维百科o all their VBA.
Is it possible to code the excel VBA to reference outside VBA files? That way, when I make a change, I only change it in the main vba source file. This might be a stretch, but is it possible to write a module/.NET dll that would import the .bas file on open?
Thanks in advance, -Matt
Answered by Tim Williams in his comment.
精彩评论