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.

XL2000: Private Functions Are Available to Worksheet


View products that this article applies to.

This article was previously published under Q199200

↑ Back to the top


Symptoms

When you create a user-defined function in Microsoft Visual Basic for Applications, you can use the function in the worksheet even though you have declared it as Private or you have used Option Private Module.

↑ Back to the top


Cause

This problem occurs when you do the following:

You use the Private Function statement.

-or-

You use the Option Private Module statement.

↑ Back to the top


Status

Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.

↑ Back to the top


More information

You can create a user-defined function and make it private to the subroutine by using the statement Private Function name. Or, you can make it private to the module by using the statement Option Private Module.

Although you can manually enter a private user-defined function into a worksheet cell, the function is not listed in the User-defined function category in the Paste Function dialog box.

NOTE: A function listed as Private will not conflict with built-in functions or defined names with the same name.

↑ Back to the top


Keywords: KB199200, kbpending, kbbug

↑ Back to the top

Article Info
Article ID : 199200
Revision : 5
Created on : 9/12/2006
Published on : 9/12/2006
Exists online : False
Views : 215