View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
anilsolipuram[_110_] anilsolipuram[_110_] is offline
external usenet poster
 
Posts: 1
Default Variables- Multiple forms


If form1 variable as to be passed to form2 , in the form1 you have
define the function which will return the variable from form1 and from
form2 you have to call that defined function



in form1 the code is

Dim str As Variant
Private Sub UserForm_Initialize()
str = "testmne"
End Sub
Function f11()
f11 = str
End Function

in form2 the code is

Private Sub UserForm_Initialize()
MsgBox UserForm2.f11
End Sub


--
anilsolipuram
------------------------------------------------------------------------
anilsolipuram's Profile: http://www.excelforum.com/member.php...o&userid=16271
View this thread: http://www.excelforum.com/showthread...hreadid=382222