Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
How do I delete custom lists
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 |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
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 |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
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 |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
How do I delete custom lists
Terry
If not familiar with VBA and macros, see David McRitchie's site for more on "getting started". http://www.mvps.org/dmcritchie/excel/getstarted.htm In the meantime.......... First...create a backup copy of your original workbook. To create a General Module, hit ALT + F11 to open the Visual Basic Editor. Hit CRTL + R to open Project Explorer. Find your workbook/project and select it. Right-click and InsertModule. Paste the code in there. Save the workbook and hit ALT + Q to return to your workbook. Run the macro by going to ToolMacroMacros. You can also assign this macro to a button or a shortcut key combo. Gord Dibben MS Excel MVP On Mon, 16 Oct 2006 03:44:01 -0700, Terry_Dell wrote: 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 Gord Dibben MS Excel MVP |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Custom Lists | Excel Discussion (Misc queries) | |||
Tools Options Custom Lists | Excel Discussion (Misc queries) | |||
Storing custom lists | Excel Discussion (Misc queries) | |||
Custom lists - not following defined order | Excel Worksheet Functions | |||
How to delete duplicate records when I merge two lists (deleting . | Excel Worksheet Functions |