+ Reply to Thread
Results 1 to 2 of 2

Palette Color Control in UserForm

  1. #1
    Carlo
    Guest

    Palette Color Control in UserForm

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

    Thanks, Carlo

  2. #2
    Bob Phillips
    Guest

    Re: 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" <[email protected]> wrote in message
    news:[email protected]...
    > How can I insert a palette color control in my form?
    >
    > Thanks, Carlo





+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1