S
Sanjay
Hi,
I'm trying to undertand hpw to return a value from another function, when I
run the mtest function I receive an error for the MsgBox (IsValidType) how I
can I return a value?
Thanks!
Private Function IsValidType(ByVal sString) As String
If LCase(sString) = "standard" Then
IsValidType = "SomethingA"
Else
IsValidType = "SomethingB"
End If
End Function
Sub mtest()
myvar = "standarda"
IsValidType myvar
MsgBox (IsValidType)
End Sub
I'm trying to undertand hpw to return a value from another function, when I
run the mtest function I receive an error for the MsgBox (IsValidType) how I
can I return a value?
Thanks!
Private Function IsValidType(ByVal sString) As String
If LCase(sString) = "standard" Then
IsValidType = "SomethingA"
Else
IsValidType = "SomethingB"
End If
End Function
Sub mtest()
myvar = "standarda"
IsValidType myvar
MsgBox (IsValidType)
End Sub