View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
achan achan is offline
external usenet poster
 
Posts: 1
Default delete a category

I have created a few categories, i used a code inspired of the code
below, to put some functions in but ....
How to delete or rename the categories I have created ???

Thanks for your help.



Lcat = 14
Do
Lcat = Lcat + 1
Application.ExecuteExcel4Macro _
"DEFINE.NAME(""Djzh" & Lcat & """,0,2,,," & Lcat & ")"
cat = Names("Djzh" & Lcat).Category
Loop While cat < "User Defined" And cat < CatName

If cat = "User Defined" Then
Application.ExecuteExcel4Macro _
"DEFINE.NAME(""Djzh" & Lcat & """,0,2,,,""" & CatName & """)"
End If

For i = 1 To NbFuncs
Application.MacroOptions FctName(i), FctDesc(i), , , , , Lcat
Next i

For i = 15 To Lcat
Application.ExecuteExcel4Macro "DELETE.NAME(""Djzh" & i & """)"
Next i