Hi all,
When I run a macro Excel becomes unresponsive - hope you could help. The code is made to remove all styles in the document. I suspect that either I have an error in a code, forgot one of the 101 VBA steps or perhaps it is just too much to process for the program and some modification are required.
I am using a Microsoft office 2013, also tried in MS Office 2010. Tried finding solution ideas in other threads but the search was unsuccessful.
Many thanks for your help.
When I run a macro Excel becomes unresponsive - hope you could help. The code is made to remove all styles in the document. I suspect that either I have an error in a code, forgot one of the 101 VBA steps or perhaps it is just too much to process for the program and some modification are required.
- the worksheet is saved in .xlsm format;
- automatic calculations are turned off;
- the file is saved locally on my PC, not in an archive.
I am using a Microsoft office 2013, also tried in MS Office 2010. Tried finding solution ideas in other threads but the search was unsuccessful.
Many thanks for your help.
Code:
[TABLE="width: 620"]
<tbody>[TR]
[TD="class: code"]Sub StyleKill()
Dim styT As Style
Dim intRet As Integer
On Error Resume Next
For Each styT In ActiveWorkbook.Styles
If Not styT.BuiltIn Then
If styT.Name <> "1" Then styT.Delete
End If
Next styT
End Sub[/TD]
[/TR]
</tbody>[/TABLE]