Subroutines in VB
-
i have a two subroutines.I need to pass a value from one subroutine,and change the value of another variable.This change must reflect in the calling subroutine.This must me implemented with out using module variables. pls help me to find a solution
-
i have a two subroutines.I need to pass a value from one subroutine,and change the value of another variable.This change must reflect in the calling subroutine.This must me implemented with out using module variables. pls help me to find a solution
could you post the "headlines" of your subroutines? Maybe in pseudocode. Because I wonder what you do want to do with which value. To me it sounds as if you want to do the following:
Sub Subroutine1() ... Dim myvar as variant 'your variable ... Subroutine2(myvar) End Sub Sub Subroutine2(myvar) ... End Sub
but I have no idea which value you want to change. Is this value another variable of Subroutine1? Maybe some lines of pseudocode would help or please be a little more precise *) where you do get the value from *) which value of another variable (where is it?) you do want to change Just try to describe the structure and/or actions in your program. Because from my point of view your description is a little to general! Stephan. -
i have a two subroutines.I need to pass a value from one subroutine,and change the value of another variable.This change must reflect in the calling subroutine.This must me implemented with out using module variables. pls help me to find a solution
have u tried using
ByRef