Microsoft KB Archive/213796

= XL2000: How To Share a Custom AutoFill List =

Article ID: 213796

Article Last Modified on 11/23/2006

-

APPLIES TO


 * Microsoft Excel 2000 Standard Edition

-



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:

https://partner.microsoft.com/global/30000104

For more information about the support options that are available and about how to contact Microsoft, visit the following Microsoft Web site:

http://support.microsoft.com/default.aspx?scid=fh;EN-US;CNTACTMS

To create and run the sample macro, follow these steps:  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). Press ALT+F11 to start the Visual Basic Editor. Click Module on the Insert menu.  Type the following sample code into the module: Sub Custom_List Application.AddCustomList _ ListArray:=Sheets("Sheet1").Range("A1:A50") End Sub  Run the macro. On the Tools menu in Excel 2000, click Options.</li> 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.</li></ol>

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.

Additional query words: XL2000

Keywords: kbdtacode kbhowto kbprogramming KB213796

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.