Consulting

Results 1 to 8 of 8

Thread: Solved: VBA colours appearing as grey for other users

  1. #1

    Solved: VBA colours appearing as grey for other users

    Hi,

    vbGreen appears as grey for other users of workbooks I provide. Is there any way around this, or am I restricted to the 56 colours of the standard palette?

    Thanks.

  2. #2
    Moderator VBAX Guru Simon Lloyd's Avatar
    Joined
    Sep 2005
    Location
    UK
    Posts
    3,003
    Location
    What version of excel are you using and what version are the other users using?
    Regards,
    Simon
    Please read this before cross posting!
    In the unlikely event you didn't get your answer here try Microsoft Office Discussion @ The Code Cage
    If I have seen further it is by standing on the shoulders of giants.
    Isaac Newton, Letter to Robert Hooke, February 5, 1675 English mathematician & physicist (1642 - 1727)

  3. #3
    I have this very same issue at work. A database outputs to .xls files, and when you copy it to an .xlsx (2007) file, it changes the colour.

    I suspect it's due to the different way that they handle the colour palette?

    Mark

  4. #4
    Moderator VBAX Guru Simon Lloyd's Avatar
    Joined
    Sep 2005
    Location
    UK
    Posts
    3,003
    Location
    Check out this post by Andy Pope, he's created a function to call xl2003 colour palette. http://www.excelforum.com/2184501-post4.html
    Regards,
    Simon
    Please read this before cross posting!
    In the unlikely event you didn't get your answer here try Microsoft Office Discussion @ The Code Cage
    If I have seen further it is by standing on the shoulders of giants.
    Isaac Newton, Letter to Robert Hooke, February 5, 1675 English mathematician & physicist (1642 - 1727)

  5. #5
    Thanks Simon, will take a look

    All 2003 versions in my case. On an individual workbook basis, I can insert a macro to run upon opening the file which resets the standard colours. This works fine. My next challenge will be to insert this macro to a range of new xl files automatically. Not sure this is possible - a macro to insert a macro?

  6. #6
    Moderator VBAX Guru Simon Lloyd's Avatar
    Joined
    Sep 2005
    Location
    UK
    Posts
    3,003
    Location
    Quote Originally Posted by starsky
    Thanks Simon........ - a macro to insert a macro?
    Check out Chip Pearsons website, he has worked examples there to do just that
    Regards,
    Simon
    Please read this before cross posting!
    In the unlikely event you didn't get your answer here try Microsoft Office Discussion @ The Code Cage
    If I have seen further it is by standing on the shoulders of giants.
    Isaac Newton, Letter to Robert Hooke, February 5, 1675 English mathematician & physicist (1642 - 1727)

  7. #7
    There could be something useful there, thanks Simon.

    Edit: Found some useful code there, and was able to insert an ActiveWorkbook.ResetColors based macro into the ThisWorkbook object. Thanks again.
    Last edited by starsky; 01-26-2010 at 07:25 AM.

  8. #8
    Moderator VBAX Guru Simon Lloyd's Avatar
    Joined
    Sep 2005
    Location
    UK
    Posts
    3,003
    Location
    Quote Originally Posted by starsky
    There could be something useful there, thanks Simon.

    Edit: Found some useful code there, and was able to insert an ActiveWorkbook.ResetColors based macro into the ThisWorkbook object. Thanks again.
    Thanks very much for posting back and letting us know
    Regards,
    Simon
    Please read this before cross posting!
    In the unlikely event you didn't get your answer here try Microsoft Office Discussion @ The Code Cage
    If I have seen further it is by standing on the shoulders of giants.
    Isaac Newton, Letter to Robert Hooke, February 5, 1675 English mathematician & physicist (1642 - 1727)

Posting Permissions

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