color selector
Function ReturnColorindex(Optional Text As Boolean = False) As Long
Dim rngCurr As Range
Set rngCurr = Selection
Application.ScreenUpdating = False
Range("IV1").Select
Application.Dialogs(xlDialogPatterns).Show
ReturnColorindex = ActiveCell.Interior.ColorIndex
If ReturnColorindex = xlColorIndexAutomatic And Not Text Then
ReturnColorindex = xlColorIndexNone
End If
ActiveCell.Interior.ColorIndex = xlColorIndexAutomatic
rngCurr.Select
Set rngCurr = ActiveSheet.UsedRange
End Function
--
HTH
Bob Phillips
"Steve" wrote in message
...
Good day,
Is there any VBA code that will pop up the Excel cell shading pallete and
allow the user to select the color. Then, I want to store the number of
the
color that they have selected for later use. Kind of like the
"GetOpenFileName" method, but open the cell shading colors instead.
Thanks,
|