This article was previously published under Q208444
Advanced: Requires expert coding, interoperability, and multiuser skills.
Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.
View products that this article applies to.
1. | Open the sample database, Northwind.mdb, and on the View menu, point to Toolbars, and click Customize. |
2. | In the Customize dialog box, on the Toolbars tab, click New. |
3. | In the New Toolbar dialog box, type MyCustomShortCut in the Toolbar Name box. Click OK.
NOTE: A new toolbar appears in the Customize dialog box. |
4. | In the Customize dialog box, on the Toolbars tab, click Properties. |
5. | In the Toolbar Properties dialog box, make sure MyCustomShortcut is selected in the Selected Toolbar list. In the Type list, click PopUp. Click OK on the informational message displayed. |
6. | Click Close in the Toolbar Properties dialog box. Click Close in the Customize dialog box. |
7. | Create a module and type the following line in the Declarations
section if it is not already there:
|
8. | Type the following procedure in the module:
|
9. | To test this function, type the following line in the Immediate window, and then press ENTER:
|
1. | Create a module and type the following line in the Declarations section if it is not already there:
|
2. | Type the following procedure in the module:
|
3. | To test this function, type the following line in the Immediate window, and then press ENTER:
Note that you receive the following error message:
Run-time error '5':
Invalid procedure call or argument
|
Keywords: KB208444, kbprogramming, kbprb, kberrmsg