View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_6_] Bob Phillips[_6_] is offline
external usenet poster
 
Posts: 11,272
Default Showing the standard XL Colour chart


'-----------------------------*------------------------------*--------------
--
Function GetColorindex(Optional Text As Boolean = False) As Long
'-----------------------------*------------------------------*--------------
--
Dim rngCurr As Range

Set rngCurr = Selection
Application.ScreenUpdating = False
Range("IV1").Select
Application.Dialogs(xlDialogPatterns).Show
GetColorindex = ActiveCell.Interior.ColorIndex
If GetColorindex = xlColorIndexAutomatic And Not Text Then
GetColorindex = xlColorIndexNone
End If
ActiveCell.Interior.ColorIndex = xlColorIndexAutomatic
rngCurr.Select
Set rngCurr = ActiveSheet.UsedRange
Application.ScreenUpdating = True
End Function



--

HTH

RP
(remove nothere from the email address if mailing direct)


"Richard Buttrey" wrote in
message ...
Hi,

From within a VBA Form I need to open up the standard Excel colour
chart so that the user can make a selection which will become a
variable I use elsehwere in the code.

Can someone point me in the right direction please.

Many thanks.


__
Richard Buttrey
Grappenhall, Cheshire, UK
__________________________