View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Bob Phillips Bob Phillips is offline
external usenet poster
 
Posts: 10,593
Default How do I delete custom lists

Sub DeleteLists()
Dim msg As String
Dim aryList
Dim i As Long, j As Long

For i = 1 To Application.CustomListCount
aryList = Application.GetCustomListContents(i)
msg = ""
For j = LBound(aryList) To UBound(aryList)
msg = msg & aryList(j) & vbNewLine
Next j
If MsgBox(msg & vbNewLine & vbNewLine & "Delete this list?",
vbYesNo) = vbYes Then
Application.DeleteCustomList
Application.GetCustomListNum(aryList)
End If
Next i

End Sub


--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Terry_Dell" wrote in message
...
I have inadvertently created hundreds of Custom Lists, in excel. Can I

delete
them without having to delete one by one.

Any one help please