Custom list - how to include commas?

  • Thread starter Thread starter Mike
  • Start date Start date
M

Mike

In Excel 2002 (or any version), under Tools, Options, Custom Lists, you can
either manually enter list items (separated by a comma or new line) or
import them. If you manually enter them, the entries themselves cannot
include a comma. However, if you *import* the list, the comma is okay.
I've tried delimiting with a single quote, double quotes, and using no
comma, but Excel breaks up the line at the comma. Is there a way, aside
from importing, to have a comma as part of the custom list entry? TIA,

Mike
 
How about via a macro?

Option Explicit
Sub testme()
Dim myList As Variant
myList = Array("asdf,qwer", "1234,ertw")
Application.AddCustomList myList
End Sub
 
Perfect! Thanks,

Mike

Dave Peterson said:
How about via a macro?

Option Explicit
Sub testme()
Dim myList As Variant
myList = Array("asdf,qwer", "1234,ertw")
Application.AddCustomList myList
End Sub
 
Back
Top