Shared functions

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hell
I have a few questions
1. I have public shared str as string , and on the other form I would like to reference form1.str as str how to do it ?
2. I have public shared function cleanform() - which doesn't work because I don't know how to call Me.controls.remove(sth) ... Me won't work with shared functions , how to use a sender ?
Lame

PS> I couldn't find it in manual can you tell what I should look for ?
 
Hi,

1) Place str in a module instead of a form if you want to be able to use it
anywhere in your project. Declare it like this.

Public str as string

2) Pass a reference to the form in the cleanform procedure. Use the
variable instead of me.
Public Shared Function CleanForm(ByVal frm As Form)

End Function



Ken
 
Back
Top