After I commented out your Add Graphics Code line(you did not include the dlgStatus object) your code worked fine for my sample data. So if it does not work for your code, I suspect there is a mismatch between the name of the columns in your datatable and the description column in your spectable.
Names Default To Here( 1 );
datatable = Open( "$SAMPLE_DATA/big class.jmp" );
spectable = New Table( "specs",
Add Rows( 2 ),
New Column( "Description", Character, "Nominal", Set Values( {"height", "weight"} ) ),
New Column( "LSL", Numeric, "Continuous", Format( "Best", 12 ), Set Values( [52, 61] ) ),
New Column( "USL", Numeric, "Continuous", Format( "Best", 12 ), Set Values( [70, 175] ) ),
New Column( "Units", Character, "Nominal", Set Values( {"Inches", "Pounds"} ), Set Display Width( 56 ) )
);
For( r = 1, r <= N Rows( spectable ), r++,
specname = spectable:Description[r];
Try(
dtcol = Column( datatable, specname ),
//write("No data for \!"" || specname|| "\!"");
Continue()
);
//write("Setting spec for \!"" || specname|| "\!"\!r");
If( Not( Is Missing( spectable:LSL[r] ) ) | Not( Is Missing( spectable:USL[r] ) ),
Eval(
Substitute(
Expr(
dtcol << Set Property( "Spec Limits", {LSL( _L ), USL( _U ), Show Limits( 1 )} )
),
Expr( _L ), spectable:LSL[r],
Expr( _U ), spectable:USL[r]
)
)
);
If( spectable:Units[r] != "",
Eval( Substitute( Expr( dtcol << Set Property( "Units", _U ) ), Expr( _U ), spectable:Units[r] ) )
);
progress = Floor( (r / N Rows( spectable )) * 100 );
//dlgStatus[FrameBox( 1 )] << Add Graphics Script( {Fill Color( "blue" ), Rect( 0, 1, progress, 0, 1 )} );
Wait( 0.001 );
);
Jim