VB Colors Name List | MrExcel Message Board

MrExcel Message Board
  • Forums New posts Search forums Board Rules
  • What's new Featured content New posts New Excel articles Latest activity
  • New posts
  • Excel Articles Latest reviews Search Excel articles
  • MrExcel Publishing MrExcel Homepage MrExcel Bookstore MrExcel Seminars Excel Consulting Services
Log in Register What's new Search

Search

Everywhere Threads This forum This thread Search titles only Note By: Search Advanced search…
  • New posts
  • Search forums
  • Board Rules
Menu Log in Register Install the app Install How to install the app on iOS

Follow along with the video below to see how to install our site as a web app on your home screen.

Note: This feature may not be available in some browsers.

  • If you would like to post, please check out the MrExcel Message Board FAQ and register here. If you forgot your password, you can reset your password.
  • Forums
  • Question Forums
  • Excel Questions
You are using an out of date browser. It may not display this or other websites correctly.You should upgrade or use an alternative browser. VB colors name list
  • Thread starter Thread starter lezawang
  • Start date Start date Nov 7, 2019
  • Tags Tags colors list show souce vbcolor
L

lezawang

Well-known Member
Joined Mar 27, 2016 Messages 1,805 Office Version
  1. 2016
Platform
  1. Windows
Hi I have seen values like vbgreen, vbblue,vbred etc. Is there any list that show all VBColor list? like the list below but more colors. Thank you very much 123-2.png souce: https://excelabcd.co.in/2018/12/lesson123-how-to-change-cell-color-with-vba

Excel Facts

Wildcard in VLOOKUP Click here to reveal answer Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce Sort by date Sort by votes Logit

Logit

Well-known Member
Joined Aug 31, 2016 Messages 5,082 Office Version
  1. 2019
  2. 2007
Platform
  1. Windows
The list of VB colors you provided is all there is ... for VB colors. Check out this resource for other methods : http://dmcritchie.mvps.org/excel/colors.htm Upvote 0 L

lezawang

Well-known Member
Joined Mar 27, 2016 Messages 1,805 Office Version
  1. 2016
Platform
  1. Windows
Thank you very much. What I meant what is the VBcolor name for ColorIndex = 12 What is the VBcolor corresponding to that color What is called VB DarkYellow for example or VB LightGreen or it does not have VB color name? Upvote 0 Fluff

Fluff

MrExcel MVP, Moderator
Joined Jun 12, 2014 Messages 92,677 Office Version
  1. 365
Platform
  1. Windows
There isn't one, the names you showed are the only names that exist in VBA (or at least that I'm aware of). Upvote 0 L

lezawang

Well-known Member
Joined Mar 27, 2016 Messages 1,805 Office Version
  1. 2016
Platform
  1. Windows
Yes you are right. I just read the link Logit sent and it says "Excel only recognizes names for Color 1 through 8 (Black, White, Red, Green, Blue, Yellow, Magenta, and Cyan). The colors 1-16 are widely understood color names from the VGA color palette. Of the 56 colors only 40 colors appear on the palette. The 40 colors names indicated on the Excel color palette (see below) are for descriptive purposes only. " So only 8 colors have VBcolor name. Thank you all for the help Upvote 0 Fluff

Fluff

MrExcel MVP, Moderator
Joined Jun 12, 2014 Messages 92,677 Office Version
  1. 365
Platform
  1. Windows
You're welcome & thanks for the feedback Upvote 0 Scott Huish

Scott Huish

MrExcel MVP
Joined Mar 17, 2004 Messages 20,638 Office Version
  1. 365
Platform
  1. Windows
That being said, you can define your own constants for those: Code: Public Const vbDarkRed As Long = 128 Public Const vbOrange As Long = 26367 Public Const vbDarkYellow As Long = 32896 Public Const vbTeal As Long = 8421376 Public Const vbBlue As Long = 16711680 Public Const vbBlueGray As Long = 10053222 Public Const vbGray50 As Long = 8421504 Public Const vbLightOrange As Long = 39423 Public Const vbLime As Long = 52377 Public Const vbSeaGreen As Long = 6723891 Public Const vbAqua As Long = 13421619 Public Const vbLightBlue As Long = 16737843 Public Const vbViolet As Long = 8388736 Public Const vbGray40 As Long = 9868950 Public Const vbPink As Long = 16711935 Public Const vbGold As Long = 52479 Public Const vbBrightGreen As Long = 65280 Public Const vbTurquoise As Long = 16776960 Public Const vbSkyBlue As Long = 16763904 Public Const vbPlum As Long = 6697881 Public Const vbGray25 As Long = 12632256 Public Const vbRose As Long = 13408767 Public Const vbTan As Long = 10079487 Public Const vbLightYellow As Long = 10092543 Public Const vbLightGreen As Long = 13434828 Public Const vbLightTurquoise As Long = 16777164 Public Const vbPaleBlue As Long = 16764057 Public Const vbLavender As Long = 16751052 Upvote 0 Z

Zenwood

Board Regular
Joined Sep 2, 2017 Messages 67 You can also use RGB values in your code. RGB gives you more than 17 million choices. Code: Sub FillCell() Cells(2, 2).Interior.Color = RGB(200, 200, 250) Cells(2, 2).Borders.Color = RGB(180, 180, 230) End Sub Upvote 0 You must log in or register to reply here.

Similar threads

J
  • Question Question
Conditional formatting Coloring due dates
  • JAZ91
  • Oct 30, 2024
  • Excel Questions
Replies 4 Views 196 Nov 4, 2024 JAZ91 J M
  • Question Question
Drop down list with selection containing Alpha and Numeric characters not working
  • Macca1962
  • Dec 3, 2024
  • Excel Questions
Replies 1 Views 102 Dec 3, 2024 myall_blues myall_blues M
  • Solved
Condition formatting - count how many of the same color OR value appears in the list ?
  • MasterBash
  • Oct 5, 2024
  • Excel Questions
Replies 5 Views 179 Oct 5, 2024 Asbestos_Jen Asbestos_Jen B
  • Solved
Event code to give message box and change color of auto-shape
  • bh24524
  • Mar 28, 2024
  • Excel Questions
Replies 4 Views 766 Mar 28, 2024 bh24524 B drom
  • Question Question
SUMPRODUCT to count dependent validation list column with wrong items
  • drom
  • Aug 8, 2024
  • Excel Questions
Replies 1 Views 269 Aug 8, 2024 drom drom Share: Facebook X (Twitter) LinkedIn Reddit Tumblr WhatsApp Email Share Link

Forum statistics

Threads 1,224,657 Messages 6,180,199 Members 452,969 Latest member Clement Lo

Share this page

Facebook X (Twitter) LinkedIn Reddit Tumblr WhatsApp Email Share Link
  • Forums
  • Question Forums
  • Excel Questions

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 AdBlock1)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 Plus1)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 Origin1)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 uBlock1)Click on the icon in the browser’s toolbar.2)Click on the "Power" button.3)Click on the "Refresh" button. Go back Continue without adsI've disabled my adblock Back Top

Từ khóa » Visual Basic Colours