All Questions
Tagged with vba design-patterns
11 questions
5
votes
0
answers
333
views
Extending VBA classes with Behavioral Patterns
I want to learn about Design Patterns and be able to apply them in Excel VBA. So to learn about patterns I bought a book that seems promising: Head First Design Patterns; it presents the material ...
10
votes
2
answers
2k
views
Userform Event Listener and Emitter
It has been a royal pain that MSForm controls are missing simple events such as MouseOver and Blur, and I find myself often ...
9
votes
1
answer
271
views
Class containers, filtering and coding practices
Context
Usually, when I have to deal with a collection of items (especially objects) I tent to create a container class for that collection (wrapper?). What I mean by that is: when I have to handle ...
2
votes
1
answer
2k
views
VBA UI design architecture, how to make this a piece of art
I have this very recurrent pattern at my VBA macros, where I have to ask the user to give me certain information that will be necessary for the processes to come. Most often for example, I need him to ...
1
vote
0
answers
789
views
Creating HTML using a Builder Pattern
TagBuilder class: uses a Builder Pattern to create a TagBuilder Tree that will output HTML to be written to a WebBrowser control....
10
votes
2
answers
201
views
Disposable Heroes
I had a bit of an issue with my last piece of code, having to do with cleaning up resources. I needed a way to ensure the database connection was always properly closed, even if there still were ...
7
votes
1
answer
1k
views
UnitOfWork, an excuse for multiple repositories
I needed a way of attaching multiple repositories to a presenter. Given I already had an IRepository abstraction, coming up with an ...
5
votes
1
answer
337
views
Decoupling Presenter from "child" Repository
Still pursuing the white rabbit, I had an IPresenter interface implementation featuring this method:
...
19
votes
2
answers
4k
views
Down the rabbit hole with MVP
Following-up on this post where I implemented a Repository Pattern in vba to abstract ADODB and enable testing my Excel app without hitting a database backend; curious about how far vba would let me ...
14
votes
2
answers
2k
views
YARPI: Yet Another Repository Pattern Implementation
Following-up on this post, I wanted to be able to put a copy of that Excel workbook on a USB key and take it home to keep working on the code a bit (there's more than just one or two tables to ...
6
votes
2
answers
173
views
DRYing up an initialization pattern
I maintain a VBA process that prints a large number of PDFs. It was awful when I inherited it and I've been making improvements over time, but I'm a bit stuck on this one. There are at least 4 ...