Solved Function that deactivates my toolbar

First of all: if you want to create a VBE add-in, I would recommend a COM add-in for this. This can then be loaded directly when the VBA editor is opened. To create a COM add-in, you could use twinBasic, for example. Of course you can also create this with .net (VB.net, or C#).

You can create an Access add-in in the same way as an Access application.
The difference between CurrentDb and CodeDb as well as between CurrentProject and CodeProject is revelant in an Access add-in (Current* => access to the application, Code* = access to the “file” in which the code is executed - i.e. to the add-in).

There are a few videos about add-ins at https://www.youtube.com/@AccessUserGroups
 
Thank you very much for all these answers which helped me in the progress of my project.
Access vba offers a lot of resources that I haven't gotten around to yet and probably never will... :)
 
I assume that you like programming, otherwise you would use Mz-Tools to insert a module header and not build something yourself. :)

Perhaps a few examples of Access add-ins that process codemodules will help.
Tip: Take a look at the installation variant of msaccess-vcs. I find it very user-friendly.

Here is another very simple twinBasic project (Access COM add-in) that provides a ribbon tab.
Note: the ACLib* add-ins are mine, but are not intended to be an advertisement for the add-ins, just a small selection for viewing the code.
 
Last edited:
I assume that you like programming, otherwise you would use Mz-Tools to insert a module header and not build something yourself. :)

Perhaps a few examples of Access add-ins that process codemodules will help.
Tip: Take a look at the installation variant of msaccess-vcs. I find it very user-friendly.

Here is another very simple twinBasic project (Access COM add-in) that provides a ribbon tab.
Note: the ACLib* add-ins are mine, but are not intended to be an advertisement for the add-ins, just a small selection for viewing the code.

Crystal Long (@strive4peace ) gave a presentation on Access Add-ins at a recent user group meeting.
 
I assume that you like programming, otherwise you would use Mz-Tools to insert a module header and not build something yourself. :)

Exactly, I was using Mz-Tools 3.0, but with the Access updates, it's no longer valid, so to pass the time, I thought, why not? I certainly don't have your qualifications, but I'm enjoying myself... right down to the problems I don't master. Thanks for the links
Thanks
 
Exactly, I was using Mz-Tools 3.0, but with the Access updates, it's no longer valid, so to pass the time, I thought, why not? I certainly don't have your qualifications, but I'm enjoying myself... right down to the problems I don't master. Thanks for the links

Thanks
MZ-Tools is no longer free, but I find it well worth the cost of a license. While working with your code I kept asking myself why you were doing it when MZ-Tools is available, and also how Carlos Quintero achieved the desired result when adding headers
 
Just as an idea for a procedure for Access/VBA friends:
You could create an Access add-in first and if you feel in the mood later, you can continue to use this code in twinBasic with probably only a few (maybe even no) modifications.

Disadvantage of an Access add-in: you have to call it up once to load it.
A COM add-in can be set so that it is already loaded with the application. This allows you to display a ribbon or the commandbars in the VBE right from the start, for example.
 
Last edited:
Just as an idea for a procedure for Access/VBA friends:
You could create an Access add-in first and if you feel in the mood later, you can continue to use this code in twinBasic with probably only a few (maybe even no) modifications.

Disadvantage of an Access add-in: you have to call it up once to load it.
A COM add-in can be set so that it is already loaded with the application. This allows you to display a ribbon or the commandbars in the VBE right from the start, for example.
Phillip Stiefel's presentation on COM add-ins is now on the AUG YouTube channel.

I'm editing Geoffrey L. Griffith's presentation on using VSTO to create COM add-ins. I'll upload it to YouTube soon, I hope.
 
Hello,
I've tried the Add-In for the last 2 days, it's very good, it allows me to use the menu bar I've created.
I didn't quite understand how the Add-Ins kept the menu bar operational, it doesn't have its own code, we just moved “Public Sub BrandNewBarAndButton()” into the Add-In.
Secondary problems, but not crucial:
- If I put my “InsertionVBA” file in the Add-in, all the code concerning the main file has to be taken over for addressing.
- If I put “InsertionVBA” in the main file, it's easier for all the code concerning my main file. Curiously, if I try to put a header in my Add-in, it terminates access to the menu bar.
Thanks again for all your help.
 

Attachments

Users who are viewing this thread

Back
Top Bottom