+ Reply to Thread
Results 1 to 3 of 3

Changing Tab Colors Via Code (Type Mismatch)

  1. #1
    Registered User
    Join Date
    10-17-2005
    Posts
    40

    Changing Tab Colors Via Code (Type Mismatch)

    Hello all,
    I am writing a bit of code for a workbook that is tracking individuals working in groups. I have created a UserForm to add new individuals. On this form I want them to be able to put in their name, their status and to choose a tab color. I found a color picking dialog created by John Walkenbach which returns the color picked as MSACCESS color numbers. This is find for setting back-colors of buttons and such but is not working when I try and apply it to the tab color. I have tried to use .Tab.Color, and .Tab.ColorIndex. However neither have worked. I am sure it is due to the format of the color reference. Is there a way to convert the color reference from MSACCESS format to the 56 color index values?

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643
    Can you post the code, indicating where you get the error?
    If posting code please use code tags, see here.

  3. #3
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Changing Tab Colors Via Code (Type Mismatch)

    .Tab.Color worked for me.
    This syntax should work where UserColor is the selected color form JW's color picker.

    Please Login or Register  to view this content.

+ 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