XL2000: How To Share a Custom AutoFill List (213796)



The information in this article applies to:

  • Microsoft Excel 2000

This article was previously published under Q213796

SUMMARY

In Microsoft Excel 2000, custom lists are stored in the Microsoft Windows registry. You can exchange custom lists from one computer to another by using a macro that creates the custom list from a spreadsheet.

The "More Information" section of this article contains a sample Microsoft Visual Basic for Applications macro (Sub procedure) that you can use to create a file and distribute it to users who need the custom lists. In Excel 2000, the Excel toolbar file is called Excel Toolbars (9). The toolbar file is stored in the Microsoft Windows directory (for example, C:\Windows).

MORE INFORMATION

Microsoft provides programming examples for illustration only, without warranty either expressed or implied, including, but not limited to, the implied warranties of merchantability and/or fitness for a particular purpose. This article assumes that you are familiar with the programming language being demonstrated and the tools used to create and debug procedures. Microsoft support professionals can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific needs. If you have limited programming experience, you may want to contact a Microsoft Certified Partner or the Microsoft fee-based consulting line at (800) 936-5200. For more information about Microsoft Certified Partners, please visit the following Microsoft Web site: For more information about the support options that are available and about how to contact Microsoft, visit the following Microsoft Web site: To create and run the sample macro, follow these steps:
  1. Create a new Microsoft Excel workbook, and in column A of Sheet1, type a list that contains 50 entries (that is, type data in the range A1:A50).
  2. Press ALT+F11 to start the Visual Basic Editor.
  3. Click Module on the Insert menu.
  4. Type the following sample code into the module:
    Sub Custom_List()
       Application.AddCustomList _
            ListArray:=Sheets("Sheet1").Range("A1:A50")
    End Sub
    					
  5. Run the macro.
  6. On the Tools menu in Excel 2000, click Options.
  7. Select the Custom Lists tab. In the Custom Lists box, click the custom list that you created (located at the bottom of the list).

    In the List entries box, you can view the custom list from Sheet1, range A1:A50.
To share this custom list with other users, name the macro Sub Auto_Open(). The choice of this name causes the macro to run as soon as the file is opened and programmatically distributes the workbook. If you name the macro something other than Sub Auto_Open, you need to then distribute the workbook and advise users to run the macro when they receive the file.

Modification Type:MinorLast Reviewed:10/11/2006
Keywords:kbdtacode kbhowto kbProgramming KB213796