-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Considered to Implement Add New Contact? #2
Comments
Hello @tothzola, To make sure we are on the same page, this is not a real contact editor, but rather I coded this to learn better OOP in VBA and make some templates. Having said that, I suppose implementing adding routine, I think, is totally doable. Additionally, I am actually working on an ADODB backend, so that the data could be pulled from an RDBMS, and I focus on SQLite as the prototype. The worksheet backend was a stepping stone on my way to an RDBMS, and it makes more sense to implement a more functional version with such a backend. What do you think? |
Hello @pchemguy You are absolutely right and it is a very clean written template, I like it. Couldn't read the whole project, just yet. Back to my project, would love to do the backend in some database but in my case I have excel and just excel, ADODB is a great idea! Actually I use it in my project to pull worksheet table as disconnected recordset then present the data in the form ListView control this was good till I found your project 😀 can't decide to change it to as you implemented or leave it as it is. Project will grow in the future maybe recordset will read larger tables more efficiently. Looking forward to your project, |
RubberduckVBA is awesome, I stumbled upon it a few months ago. Before, I actually made a few templates with ListView/TreeView in old Excel (the 64-bit Excel does not have the TreeView control, which I want to use.) But once I started learning through RubberduckVBA VBA code samples and the blog, I realized what a mess by old code was. So I started redoing using these kind of templates. I tried to go through MVVM, but did not go to far. SecureADODB is better documented, is somewhat simpler, and I was specifically looking for a VBA ADODB library, which is how I found RubberduckVBA. Depending on needs, sure, Worksheets can act as basic database as well. Have you considered SQLite though, which would be a second file living next to your Excel file, for example? Indeed, you can use ADODB to pull data from Excel as well. I am not sure, however, that adding ADODB layer between VBA and the Worksheet can speed things up. I pull entire table from the Worksheet into a Variant 2D array like Dim Records as Variant
Records = DataSheet.Range("A2:F50") and you can save a 2D array to a Range in a similar fashion. |
Thanks for the quick reply. For now I will leave the data in the workbook, Yes the MVVM project leaks for better documentation, it is a great pattern. Thanks for the tip, will consider it. |
I see. There are a few instructive posts regarding decoupling the VBA code on RubberduckVBA blog, maybe you have read them already. That is what I also aiming at to accomplish here. I do not know specific structure of your workbook, but I in general try avoiding looping through cells as much possible. When I have a rectangular region to fill, I would prepare a 2D array and then copy it to the range in one go. On the other hand, if you need to change just a few cells, looping through them might be better. Effeciency-wise, you could also try https://codereview.stackexchange.com/, to get advices for improving working code. |
Hello @pchemguy how are you? |
Hey, actually, this is not my account. You could use, for example, Reddit (reddit.com/user/pchemguy). |
Uups sorry for that. |
Hello pchemguy,
first aw all very nice project, very inspiring, thumbs up!
I'm working on a similar project maintaining a customers data in excel. (Data validations, multiple forms, list views, quite complex)
Will it be difficult to implement an add new contact in your project, died you consider this?
Thanks for your reply.
Regard, Zoltan
The text was updated successfully, but these errors were encountered: