I'm stuck in a problem... I'm reading an ini file and have an eror label called "erro", wich gets called if there is any proble accesing the file...But how ca I call the errorlabel upon a condition?
it's my way of doing things...bare with me on this one..
'Here I want to test if the resulting string is equal to a known string (my own name), if not, then should be considered an invalid ini file, and jump to the error label.
If Nome<>"Paulo Sérgio Gomes" Then ' then what???
I tryied that, it errors sayin the the variable erro is used before assigned a value..
If Nome<>"Paulo Sérgio Gomes" Then Goto Erro' then what???
Just one more "Stupid" question, to exit the sub before the error label gets executed.., I just tipe "exit", right?
Not so stupid. More of a common mistake.
You should add Return before the error label.
I know it probably woul be a lot worse, mistake wise, but woudn't it be more logical an "ExitSub" keyword?
woudn't it be more logical an "ExitSub" keyword?
Don't forget that Subs can return values so that "Return var" is quite logical.