Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can i affect a funtion in way to give me a True or False Value? 2

Status
Not open for further replies.

Gti

Programmer
Jul 23, 2001
99
PT
I call a function like:

If test = True then
code
End If

Public Sub Test ()
code
end sub

How can i give a value of true or false to the function in way to pass that if?
Tkx ;-)
 
Do you mean

Declare Function XXX (value as ###) AS Boolean

If value = test then
XXX = True
Else
XXX = False
End If

End Function

Sub ToCallXXXFunction()
Dim YYY as Boolean
...

YYY = XXX(PassValueIntoXXX)

...
End Sub

 
I dont think that you have understand what i want...
I have the main function with an if.

if test = true then
code
End if
My function is the test, so:
Public sub Test ()
I want to give the value of true or false here in way to pass it to the if... any ideia?
End sub

tkx ;-)
 
Do exactly what Hughg suggested. change the Public Sub Test into a Public Funtion Test As Boolean and then use the word Test in your If-Then statement. It will automatically call the function. - Jeff Marler B-)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top