Solved

VB.net Excel Add-in ARGB color vs RGB Color in Excel

Posted on 2014-03-10
2
498 Views
Last Modified: 2014-03-10
Hi.
I was told by an Expert how to get the RGB color of an Excel cell using the following VBA code
What is the difference between the ARGB color in VB.net and the RGB color in Excel VBA?

Sub oGet()
Dim lColor As Long
lColor = Selection.Interior.Color

MsgBox "Red: " & lColor Mod 256 & vbCrLf & _
            "Green: " & Int(lColor / 256) Mod 256 & vbCrLf & _
            "Blue:" & Int(lColor / 256 ^ 2) Mod 256
End Sub
0
Comment
Question by:murbro
2 Comments
 
LVL 39

Accepted Solution

by:
nutsch earned 500 total points
ID: 39919033
The A is for Alpha, i.e. the transparency factor, from 0 opaque to 255 transparent.
0
 

Author Closing Comment

by:murbro
ID: 39919697
Thanks
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.

813 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now