View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
Terry_Dell Terry_Dell is offline
external usenet poster
 
Posts: 1
Default How do I delete custom lists

Thanks for the reply Bob, but not sure on how to start. Where do I start - in
excel or dos?
could you please guide me.

Thanks Terry

"Bob Phillips" wrote:

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