+ Reply to Thread
Results 1 to 5 of 5

Apply background colour and font colour on sheets following specific naming pattern

  1. #1
    Forum Contributor
    Join Date
    02-07-2013
    Location
    London
    MS-Off Ver
    Excel 2019
    Posts
    105

    Apply background colour and font colour on sheets following specific naming pattern

    Hello everyone,

    I have put together the below code:
    Please Login or Register  to view this content.
    I would like it to be applied only to sheets named in "DD.MM" format

    At the moment it works but because i pasted the code on each sheet; i want it to be in a module only.
    I would also like the text in "I6:i90","l6:l90","o6:o90" to be white. (girly stuff, looks nicer )


    can you please help?


    thank you in advance
    Last edited by annazet; 09-14-2018 at 08:39 AM.

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Apply background colour and font colour on sheets following specific naming pattern

    You can put your code in the ThisWorkbook module with the updates shown, and add the initial line of code shown, and qualify your range references as shown.

    I have not tested this but would be happy to do so if you provide a sample file.

    Please Login or Register  to view this content.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Forum Contributor
    Join Date
    02-07-2013
    Location
    London
    MS-Off Ver
    Excel 2019
    Posts
    105

    Re: Apply background colour and font colour on sheets following specific naming pattern

    Thank you, tried applying the changes but i get an error with an indication on
    Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target As Range)

  4. #4
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Apply background colour and font colour on sheets following specific naming pattern

    Try this, and remember it goes in the ThisWorkbook module.
    Please Login or Register  to view this content.
    If posting code please use code tags, see here.

  5. #5
    Forum Contributor
    Join Date
    02-07-2013
    Location
    London
    MS-Off Ver
    Excel 2019
    Posts
    105

    Re: Apply background colour and font colour on sheets following specific naming pattern

    Amazing ! Thank you xxx
    wanted the text to be white as well but can live without it; dont want to impose to much.
    THank you Jazzer and Nori

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] format a cell background colour based on a manual background colour of an adjacent cell
    By Nampara in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-24-2018, 04:03 PM
  2. [SOLVED] Search cells based on student name, cell background colour and return a tally for colour
    By drof_06 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 01-26-2016, 04:31 AM
  3. Replies: 6
    Last Post: 03-12-2014, 09:52 AM
  4. [SOLVED] change of font colour or background colour vba
    By KK1234 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 02-22-2014, 08:20 PM
  5. Extract Cell Font/Background Colour
    By icu222much in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 07-02-2010, 11:17 PM
  6. Worksheet Background and Font Colour
    By Apple Ling in forum Excel General
    Replies: 9
    Last Post: 06-23-2009, 03:10 AM
  7. How can I count cells of a specific colour (pattern)?
    By Nick@Durham in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-29-2005, 06:25 AM

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