[Last Call] Learn how to a build a cloud-first strategyRegister Now

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 316
  • Last Modified:

What is the code for System Menu Highlight for Back Color on a property on a control on a form?

I am using Access 2007 and need to use VBA code to change the back color on a label to "System Menu Highlight".

This fails:  Me.lblBondNum.BackColor = "System Menu Highlight" if I use the string. Is there a code/number to use for System Menu Highlight, so I can set the property?
1 Solution
These are the system color values I know.

-2147483648      Scroll bar color
-2147483647      Desktop color
-2147483646      Color of the title bar for the active window
-2147483645      Color of the title bar for the inactive window
-2147483644      Menu background color
-2147483643      Window background color
-2147483642      Window frame color
-2147483641      Color of text on menus
-2147483640      Color of text in windows
-2147483639      Color of text in caption, size box, and scroll arrow
-2147483638      Border color of active window
-2147483637      Border color of inactive window
-2147483636      Background color of multiple-document interface (MDI) applications
-2147483635      Background color of items selected in a control
-2147483634      Text color of items selected in a control
-2147483633      Color of shading on the face of command buttons
-2147483632      Color of shading on the edge of command buttons
-2147483631      Grayed (disabled) text
-2147483630      Text color on push buttons
-2147483629      Color of text in an inactive caption
-2147483628      Highlight color for 3-D display elements
-2147483627      Darkest shadow color for 3-D display elements
-2147483626      Second lightest 3-D color after vb3DHighlight
-2147483625      Color of text in ToolTips
-2147483624      Background color of ToolTips

You can also use the object browser (F2) and search the VBA library for SystemColorConstants.

I don't see anything that looks like  System Menu Highlight, but you can try the value of "Background color of items selected in a control" , -2147483635.


gtrappAuthor Commented:

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now