+ Reply to Thread
Results 1 to 7 of 7

Auto format on worksheet open

  1. #1
    Registered User
    Join Date
    08-03-2007
    Posts
    23

    Auto format on worksheet open

    I have a select case statement that formats cells based on text typed. I want to apply the same logic to a range of cells when I open the worksheet and select a range. Can someone help with the change I need to the below code?
    Muchas gracias

    Please Login or Register  to view this content.

  2. #2
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967
    Use the sheet_activae and selection_change events.

    Break the target down into individual cells

    Please Login or Register  to view this content.
    Martin

  3. #3
    Registered User
    Join Date
    08-03-2007
    Posts
    23
    Martin,
    I'm not sure I understand. I want to open the worksheet, highlight a range of cells and have them reformatted according to the select case criteria established. Forgive my ignorance. I am very new to this.

    Thank you

  4. #4
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967
    Let me check my understanding. What event do you want to trigger the running of the code.

    Is is the opening of the sheet and formatting whatever happens to be selected or every time you select any cell. Both sound a bit unlikely.

    Or maybe you are after something which runs once you have selected the set of cells that you are interested in and not for others?

  5. #5
    Registered User
    Join Date
    08-03-2007
    Posts
    23
    The latter.
    Once I select a range of cells I want to execute the Select case.

  6. #6
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    Is this what you mean?

    Please Login or Register  to view this content.
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  7. #7
    Registered User
    Join Date
    08-03-2007
    Posts
    23
    Roy,
    Excellent !!! That is exactly what I was trying to do.

    Thanks so much.

+ 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