Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 179
Default Palette Color Control in UserForm

How can I insert a palette color control in my form?

Thanks, Carlo
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Palette Color Control in UserForm

Carlo,

This is how I do it. I have a button, and this button calls a function that
shows the colour picker, and returns the chosen colour.

This is the function.

'---------------------------------------------------------------------------
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)


"Carlo" wrote in message
...
How can I insert a palette color control in my form?

Thanks, Carlo




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Color Palette JAD Excel Discussion (Misc queries) 0 November 30th 07 04:21 PM
Color Palette JAD Excel Discussion (Misc queries) 1 November 19th 07 02:26 AM
Bring up Color Palette to select color pokdbz Excel Discussion (Misc queries) 4 August 6th 07 10:13 PM
Color Palette, color disappears Emil Excel Discussion (Misc queries) 3 November 29th 05 05:07 AM
Changing color in color palette Dave Peterson Setting up and Configuration of Excel 0 December 12th 04 02:39 PM


All times are GMT +1. The time now is 09:19 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"