Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On Tue, 6 Mar 2007 09:47:15 -0800, Gary''s Student
wrote: Thanks Jim. VBA Help was strangely silent on the topic of friend. When I put my cursor on "friend", and selected F1, HELP for Friend popped up. Friend Modifies the definition of a procedure in a form module or class module to make the procedure callable from modules that are outside the class, but part of the project within which the class is defined. Friend procedures cannot be used in standard modules. Syntax [Private | Friend | Public] [Static] [Sub | Function | Property] procedurename The required procedurename is the name of the procedure to be made visible throughout the project, but not visible to controllers of the class. Remarks Public procedures in a class can be called from anywhere, even by controllers of instances of the class. Declaring a procedure Private prevents controllers of the object from calling the procedure, but also prevents the procedure from being called from within the project in which the class itself is defined. Friend makes the procedure visible throughout the project, but not to a controller of an instance of the object. Friend can appear only in form modules and class modules, and can only modify procedure names, not variables or types. Procedures in a class can access the Friend procedures of all other classes in a project. Friend procedures don't appear in the type library of their class. A Friend procedure can't be late bound. --ron |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
trying to help a friend | New Users to Excel | |||
A Little Favor for a Friend | Excel Programming | |||
combined HLOOKUP (urgent for a friend) | Excel Worksheet Functions | |||
Can't think tonight - for a friend, can you help? | Excel Programming | |||
just broke up with girl friend we had puter together | Excel Programming |