getting varible value
small question on getting varible value I declared one varible as global I assigned varible value in one function .I'm trying to acess the value in some other function same as below way surprisingly same behaviour I'm getting fruitfull results on script and some scripts I'm not getting (passing )the value it's going after else part
can any give sugestions on this .
Public function abc()
Public function bbc()
If a="G" Then
Re: getting varible value
Im hoping this is just a bad example!
Why hard code the value?
Anyway your example works fine for me. Gives s when I supply G and n when its anything else. And as the function doesnt return anything its not really a function and better suited to a 'sub'
A possible better version below:
Public Sub abc(value)
' I guess something will
' happen here. Otherwise calling abc is pointless!
Public sub bbc(value)
If value="G" Then