Sub Delete_SH()
Dim v As Worksheet, l As Long
Const s As String = "Elevdata Rapportvalidering Kontrollark Samleark"
l = Len(s)
Application.DisplayAlerts = False
For Each v In Worksheets
If l = Len(VBA.Replace(s, v.Name, "")) Then _
v.Delete
Next
Application.DisplayAlerts = True
End Sub
regards
r
Il mio ultimo lavoro ...
http://excelvba.altervista.org/blog/...ternative.html
"Sverre" wrote:
> I have a workbook with many diefferent sheets. I need a makro to delete all
> sheets except 4 sheets named:
> Elevdata,
> Rapportvalidering,
> Kontrollark,
> Samleark,
>
> It is not possible to record a makro because the sheets can appear with
> different names.
>
> Regards Sverre
>
>