#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15
Default Deleting styles

When I add from another Excel (2003) file into one of mine, I unfortunately
also inherit all of their styles. I have a file currently with about 50
styles from other people of which about ten of those are different "Normal"
styles alone.

I know how to delete them one-by-one via Format, Style, Delete (what a
tedious process, MS!) till only those remain that I prefer.

Is here a way that I can select at once all those I don't want and delete in
a single stroke?

If not, can someone explain why MS did not allow for this?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 434
Default Deleting styles

hi, !

When I add from another Excel (2003) file into one of mine, I unfortunately also inherit all of their styles.
I have a file currently with about 50 styles from other people of which about ten of those are different "Normal" styles alone.
I know how to delete them one-by-one via Format, Style, Delete (what a tedious process, MS!) till only those remain that I prefer.
Is here a way that I can select at once all those I don't want and delete in a single stroke?
If not, can someone explain why MS did not allow for this?


the following macros does this:

first: puts all the styles names starting on active cell downward
so you can revise/check/remove/separate/... those you want to remain
and let all-togheter those you want to be deleted/erased/removed/...
select the result contiguous range and run ...

the second: deletes the names in the selected contiguous range (one column)

hth,
hector.

Sub GetStylesNames()
Dim n As Integer
With ActiveWorkbook.Styles
For n = 1 To .Count
ActiveCell.Offset(n - 1) = .Item(n).Name
Next
End With
End Sub

Sub DeleteSelectedStyles()
Dim n As Byte, Styles2Erase As String
For n = 1 To Selection.Count
Styles2Erase = Styles2Erase & Selection.Cells(n) & ""","""
Next
ExecuteExcel4Macro "if(delete.style({""" & Styles2Erase & """}))"
End Sub


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Deleting styles

I have tried several macros to delete styles however I'm still left with a
large number of styles that appear to be 'untoucheable' - similar to hidden
reference names, only I have not found a method to 'unhide' these style names.

Are you aware of any method that can clear styles that cannot be modified or
deleted?

Thanks,
Rick

"Héctor Miguel" wrote:

hi, !

When I add from another Excel (2003) file into one of mine, I unfortunately also inherit all of their styles.
I have a file currently with about 50 styles from other people of which about ten of those are different "Normal" styles alone.
I know how to delete them one-by-one via Format, Style, Delete (what a tedious process, MS!) till only those remain that I prefer.
Is here a way that I can select at once all those I don't want and delete in a single stroke?
If not, can someone explain why MS did not allow for this?


the following macros does this:

first: puts all the styles names starting on active cell downward
so you can revise/check/remove/separate/... those you want to remain
and let all-togheter those you want to be deleted/erased/removed/...
select the result contiguous range and run ...

the second: deletes the names in the selected contiguous range (one column)

hth,
hector.

Sub GetStylesNames()
Dim n As Integer
With ActiveWorkbook.Styles
For n = 1 To .Count
ActiveCell.Offset(n - 1) = .Item(n).Name
Next
End With
End Sub

Sub DeleteSelectedStyles()
Dim n As Byte, Styles2Erase As String
For n = 1 To Selection.Count
Styles2Erase = Styles2Erase & Selection.Cells(n) & ""","""
Next
ExecuteExcel4Macro "if(delete.style({""" & Styles2Erase & """}))"
End Sub



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Creating styles GKW in GA Excel Discussion (Misc queries) 3 March 24th 08 12:33 AM
Excel Cell Styles - Quick Styles? Dean@DCF Excel Discussion (Misc queries) 0 November 15th 07 10:40 PM
Outline Styles teksmith Excel Discussion (Misc queries) 1 March 24th 06 03:48 PM
Styles in Excel MLoftusNYC Excel Discussion (Misc queries) 1 October 5th 05 08:27 AM
format styles Kelly New Users to Excel 0 August 9th 05 02:51 PM


All times are GMT +1. The time now is 05:36 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"