I'm just wondering that here in the forum the topic of custom code colors in the VBE is not so widespread.
I can't imagine for the life of me to code with the default colors of the VBE anymore.
In the past years, I still consciously developed with Microsoft Access 2013 (MSI setup).
There I used the VBEThemeColorEditor (https://github.com/gallaux/VBEThemeColorEditor) to patch my desired colors into the "Vbe7.dll" to be able to create a Monokai-like scheme.
However, this procedure also had disadvantages:
- After patching the DLL, Microsoft Access always crashed when I activated the "Editor Format" tab in the VBE under "Tools / Options".
But I was able to fix that, as discussed here: https://github.com/gallaux/VBEThemeColorEditor/issues/11.
- If Microsoft made changes to the DLL by an update, I had to patch the new version again accordingly. But even that worked.
- However, since I switched to Microsoft Access 2016 (C2R setup) due to Microsoft's lack of further support for Microsoft Access 2013, Microsoft quite often replaces my patched DLL with the original version. And I have to copy my patched version back into the appropriate folder. This is annoying.
So I looked to see if I couldn't get something reasonably maybe Monokai-like with the original colors, where I don't have to patch the DLL at all, but use the original version.
The result is this color and font configuration:
I'm more than happy with this.
Who wants to try it can import this registry file:
```
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Microsoft\VBA\7.1\Common]
"FontHeight"=dword:0000000c
"FontCharSet"=dword:00000000
"FontFace"="Consolas"
"CodeBackColors"="4 3 4 7 6 4 4 4 0 0 0 0 0 0 0 0 "
"CodeForeColors"="8 1 5 4 1 3 2 12 0 0 0 0 0 0 0 0 "
"CodeBackColorsOriginal"="0 0 0 7 6 0 0 0 0 0 0 0 0 0 0 0 "
"CodeForeColorsOriginal"="0 0 5 0 1 10 14 0 0 0 0 0 0 0 0 0 "
```
The registry file only changes settings that can be set in the VBE under "Tools / Options" on the "Editor Format" tab, so no 'tricks' are used.
Font name, size, foreground and background colors are set.
The original Microsoft colors are stored in the additional "*Original" values.
If you have already configured your own colors there, you should save them beforehand, e.g. using the registry editor under "HKEY_CURRENT_USER\Software\Microsoft\VBA\7.1\Common".
It is sufficient if you rename the values "CodeForeColors" and "CodeBackColors" to "MyCodeForeColors" and "MyCodeBackColors", then they cannot be overwritten and you can restore them in the registry editor later on if you want.
And of course I'm also very curious to see which colors you have configured in your VBE.
I can't imagine for the life of me to code with the default colors of the VBE anymore.
First a small digression to the topic "VBEThemeColorEditor":
In the past years, I still consciously developed with Microsoft Access 2013 (MSI setup).
There I used the VBEThemeColorEditor (https://github.com/gallaux/VBEThemeColorEditor) to patch my desired colors into the "Vbe7.dll" to be able to create a Monokai-like scheme.
However, this procedure also had disadvantages:
- After patching the DLL, Microsoft Access always crashed when I activated the "Editor Format" tab in the VBE under "Tools / Options".
But I was able to fix that, as discussed here: https://github.com/gallaux/VBEThemeColorEditor/issues/11.
- If Microsoft made changes to the DLL by an update, I had to patch the new version again accordingly. But even that worked.
- However, since I switched to Microsoft Access 2016 (C2R setup) due to Microsoft's lack of further support for Microsoft Access 2013, Microsoft quite often replaces my patched DLL with the original version. And I have to copy my patched version back into the appropriate folder. This is annoying.
Now to the actual topic:
So I looked to see if I couldn't get something reasonably maybe Monokai-like with the original colors, where I don't have to patch the DLL at all, but use the original version.
The result is this color and font configuration:
I'm more than happy with this.
Who wants to try it can import this registry file:
```
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Microsoft\VBA\7.1\Common]
"FontHeight"=dword:0000000c
"FontCharSet"=dword:00000000
"FontFace"="Consolas"
"CodeBackColors"="4 3 4 7 6 4 4 4 0 0 0 0 0 0 0 0 "
"CodeForeColors"="8 1 5 4 1 3 2 12 0 0 0 0 0 0 0 0 "
"CodeBackColorsOriginal"="0 0 0 7 6 0 0 0 0 0 0 0 0 0 0 0 "
"CodeForeColorsOriginal"="0 0 5 0 1 10 14 0 0 0 0 0 0 0 0 0 "
```
The registry file only changes settings that can be set in the VBE under "Tools / Options" on the "Editor Format" tab, so no 'tricks' are used.
Font name, size, foreground and background colors are set.
The original Microsoft colors are stored in the additional "*Original" values.
If you have already configured your own colors there, you should save them beforehand, e.g. using the registry editor under "HKEY_CURRENT_USER\Software\Microsoft\VBA\7.1\Common".
It is sufficient if you rename the values "CodeForeColors" and "CodeBackColors" to "MyCodeForeColors" and "MyCodeBackColors", then they cannot be overwritten and you can restore them in the registry editor later on if you want.
And of course I'm also very curious to see which colors you have configured in your VBE.