View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Michel Pierron Michel Pierron is offline
external usenet poster
 
Posts: 214
Default Get RGB settings

Hi Zone,
With something like that (by assigning this macro to your line):

Private Type RGB_Wrapper
Red As Byte
Green As Byte
Blue As Byte
Alpha As Byte
End Type

Private Type LNG_Wrapper
Value As Long
End Type

Sub RGB_Settings()
Dim Color As LNG_Wrapper, Colors As RGB_Wrapper
Color.Value = ActiveSheet.Shapes("Line 1").Line.ForeColor
LSet Colors = Color
MsgBox "R: " & Colors.Red & vbLf _
& "G: " & Colors.Green & vbLf _
& "B: " & Colors.Blue
End Sub


"Zone" a écrit dans le message de news:
...
I have a line on a worksheet and its color is set with RGB settings. I
want to select the line and run a macro that will show me the RGB
settings. TIA, James