VBA? Change automatic colors

darkish

New Member
Joined
Aug 8, 2018
Messages
4
Hello Everybody.

I work long hours on my laptop and I'm trying to customize a little the appearance of my PC.


I'd like a DARK theme, but unfortunately, Windows 7 doesn't think I deserve it: I managed to get a dark theme (without aero) but this changes the "default colors" and excel became impossible to use (I'd like Excel to remain the same, as with the light theme).


Is it possible to set, maybe with VBA code, different automatic colors?


Please see the image below that explains better the concept.


Thanks in advance.





330r5mg.jpg
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
Hello Yongle and thank you for your reply; unfortunately I don't think so :-/

Save a custom theme for reuse
Once you’ve made changes to your theme, you can save it to use again. Or you can make it the default for new documents.

as the page says, you can change the theme for the document and for new documents, but not for existing ones. Moreover, I've noticed that not only the default theme is affected by the behavior I've described, but also other themes in use in the workbook, so changing the default theme won't help.


Any other ideas?


thanks!
 
Upvote 0
Idea 1 - dump the darkness!

I am thinking out aloud here...

If you do not like that idea, you might be able to use conditional formatting carefully to achieve some of what you want

Warning :warning:
- if you are already using CF extensively then that would probably be a bad idea
- if you are over-artistic artistic habitually colour your worksheets every colour of the rainbow then that would probably be a bad idea

Perhaps all windows default colours are switched round logically like this
old colour 0 is now colour 999999, old colour 1 is now colour 999998...old colour 999999 is now colour 0

I'm thinking of some VBA that
- sits in its own workbook
- conditionally switches white to black and black to white etc
- does not actualy change the underlying values, only the appearance to you
- runs when file opens

and alters appearance of
- background
- borders
- font

Downside :warning:
I suspect that it may be very resource intensive
- conditionally formatting every cell would kill your laptop
- would have to restrict to used ranges

Perhaps you could play with CF manually and see if you think the idea is a goer
 
Upvote 0
While the first idea is the easiest to implement, I was looking for a way to alter how Excel displays the existing worksheets and I begin to suspect that it's not possible. :-/
 
Upvote 0
Thinking about things in more depth....

Printing your worksheet
What happens when you print a worksheet?
- are the colours printed in accordance with the dark theme?

A switch
You could do with a switch so that you can flip between the dark world and this one. I have no idea how Windows handles the "darkness" but I am guessing that a registry value has changed to point something at a different "colour file"
If that is the case, it may be possible to create 2 batch files
-batch1 restores the original default colours and ...
- batch2 returns you to the dark side
Then batch1 runs when Excel opens and batch2 when it closes
Of course, this idea may be rubbish - some changes need a reboot to take effect
Worth investigating though

Others in same boat
Someone else must have the same issues
- I am guessing you picked your dark theme method up from a website. Probably worth a re-visit and see if you can get some pointers from the originator
 
Upvote 0
When printing the colors turn back to light (so the background is white, and the text is dark), this is because the appearance in the screen depends on the Windows color (the registry value is the same that controls the Windows color), so I can't rely on a switch.

Unfortunately I created the theme by myself; I searched long before posting here because I couldn't find any solution for that... anyway, thank you for your ideas!
 
Upvote 0

Forum statistics

Threads
1,223,898
Messages
6,175,274
Members
452,628
Latest member
dd2

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top