Posts: 128
Threads: 48
Joined: Jan 2007
hello,
i have a (probably simple) question.
in a macro i store some text in a string later in the same macro i want to use it again, for comparison how can i manage this? a simple example:
if x[0 0]="test"
ARRAY(str) code = x[0 0]
comparison part
if code ="yippie"
,mes"yes"
Posts: 11,922
Threads: 138
Joined: Dec 2002
Why use array? What is x?
Posts: 128
Threads: 48
Joined: Jan 2007
It is some information out of an excel sheet, and x is just a name
Posts: 11,922
Threads: 138
Joined: Dec 2002
Your question is simple but I don't understand the example.
Which part is what you don't know how to do? Compare strings? Compare arrays? Compare array elements? Store strings in a file?
Posts: 128
Threads: 48
Joined: Jan 2007
The information stored in the string, is somehow gone later in the macro in the comparison part. It is separated in several parts so i can use the goto command to jump to it. Is it possible to store this and use it later in the comparison part? this is what i mean.
Sorry for the inconvenience...
Posts: 11,922
Threads: 138
Joined: Dec 2002
If something is stored in a variable, it cannot disappear while the macro is running.
If the macro runs several times, and a variable must be preserved, use global variable.
str+ globalVar
Maybe I can help if you post whole macro. Insert comments where the variable is populated and where compared.
Posts: 128
Threads: 48
Joined: Jan 2007
Thank you!
With your directions I figured it out, many thanks as always!