ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   delete a category (https://www.excelbanter.com/excel-programming/294275-delete-category.html)

achan

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


All times are GMT +1. The time now is 06:56 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com