absent Posted November 3, 2003 Posted November 3, 2003 Is there a way to convert a friend sub to a function or class? I'm trying to make some of my code resuable and less bloaty. The code reads such : Friend Sub BindToTreeview(ByVal TableName As String, ByVal FieldName As String, ByVal tView As TreeView) Now I wanna know if that can be made a class or a function... Thanx a mil Quote P.L.U.R - Peace, Love, Unity, Respect :P
Administrators PlausiblyDamp Posted November 3, 2003 Administrators Posted November 3, 2003 (edited) What exactly does the sub do? Changing a sub to a function could be as simple as replacing the word sub with function and giving it a return type - however without knowing what it does it's difficult to say what other changes would be required. Edited February 21, 2007 by PlausiblyDamp Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
joesun99 Posted November 4, 2003 Posted November 4, 2003 you can simply convert friend func. to any other tipe couse friend can only use protected subs from inherited classes. I think that classes cannot be like friend funct. Theirs func. in protected part can be used by a friend funct. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.