Here is one of the many ways this can be done
names default to here( 1 );
dt = Current Data Table();
dt << clear select;
NW = New Window( "Select",
V List Box(
Text Box( "Input a comma separated list th the Names you want subsetted" ),
teb = Text Edit Box( "", <<set width( 150 ) ),
Button Box( "OK",
i = 1;
val = teb << get text;
While( Word( i, val, "," ) != "",
theWord = Word( i, val, "," );
dt << select where( :name == theWord, current selection( "extend" ) );
i++;
);
dtSub = dt << subset( selected rows( 1 ), selected columns( 0 ) );
)
)
);
Jim