0

I just downloaded a color theme on that link (a vssetting file) and would like to know how to install it in VBA.

I have the file but no option to put it into VBA. How do I do that?

Bob Dalgleish
  • 8,167
  • 4
  • 32
  • 42
MC_B
  • 31
  • 4
  • Not sure what you want to achieve... If you want to change background color of CodePane editor, you should use Tools->Options, bookmark: Editor format. – Maciej Los Nov 08 '17 at 19:41
  • 1
    Those are for Visual Studio, not VBA. – braX Nov 08 '17 at 19:42
  • Removed greeting and thanks -- these are discouraged as they add nothing to the question. Formatted link properly, and stated the question explicitly. – Bob Dalgleish Nov 08 '17 at 22:09
  • Thanks Maciej Los and braX :) ! Bob Dalgleish , I just tried to be polite and thankful... – MC_B Nov 09 '17 at 19:55

1 Answers1

6

You can't use a .vssetting file, that's a Visual Studio thing - the VBE wouldn't know what to do with it.

Its colors are "configurable" through the Tools > Options menu; they're the same rather limited 16-bit colors from 1997... and there's no file you can import that will make a "theme" (a .reg file could act like it, perhaps)

There is a hack, though - you can hex-edit VBE7.DLL and change the available colors to whatever you like. Obviously the risk is that you completely wreck VBA in every single VBA host application at once, but hey shiny colors are worth it eh?

image from https://github.com/dimitropoulos/VBECustomColors/blob/master/README.md

The only thing I'm seeing that's remotely close to "theming" the VBE (and doesn't involve rewriting VBA itself) is what we want to achieve in Rubberduck (an OSS VBIDE add-in project I manage) by version 3.0 (we just kicked off the v2.1.x cycle), when we inject our own AvalonEdit WPF code pane into the VBE, implement our own IntelliSense and take full control of the VBE code panes' appearance and functionality - but there's a lot of work to be done before we can even dream of shipping that wet dream of a feature - so if you know a bit of C# and WPF, by all means join the Rubberduck dev team and help us do it!


Update - March 2023 work has actually started on this now, and will indeed ship with Rubberduck 3.0 (still too early for a timeline though). You can join the Rubberduck3 project with a GitHub account, devs hang out on a dedicated Discord server.

Mathieu Guindon
  • 69,817
  • 8
  • 107
  • 235
  • Thanks for the precision of the file. I will change manually in Tools > Options menu; thanks – MC_B Nov 09 '17 at 19:55
  • @MC_B you're welcome. Feel free to read [this](https://stackoverflow.com/help/someone-answers), for this question, the previous ones, and any future one you might ask on this site. – Mathieu Guindon Nov 09 '17 at 19:58