+ Reply to Thread
Results 1 to 3 of 3

Batch remove all custom cell styles using VBA

  1. #1
    Registered User
    Join Date
    10-04-2011
    Location
    Windsor, England
    MS-Off Ver
    Excel 2010
    Posts
    69

    Batch remove all custom cell styles using VBA

    Morning everyone,

    I have a spreadsheet that I inherited from someone else which has at least 100 custom cell styles set. I want to be able to delete them all and tried to write a macro to do so
    Please Login or Register  to view this content.
    While this got rid of some of the cell styles it does not remove them all. If i try and manually delete the ones that are there new ones just appear

    Is there something else I can add to the code?

    I have attached a blank copy of the workbook which shows the cell styles.

    Thanks,

    Alice

  2. #2
    Forum Contributor
    Join Date
    07-26-2012
    Location
    USA
    MS-Off Ver
    Excel 2007 & 2010
    Posts
    351

    Re: Batch remove all custom cell styles using VBA

    The code above only removes styles that are NOT built-in. So basically it removes all the custom styles in a workbook. I don't think you can delete built-in styles

  3. #3
    Registered User
    Join Date
    02-20-2015
    Location
    Coruscant
    MS-Off Ver
    2010, 2013
    Posts
    1

    Re: Batch remove all custom cell styles using VBA

    The IDE highlights

    If cellst.BuiltIn = False
    Then


    As an error and won't execute. Excel 2010.

+ 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