Ooops

I missed out the () from the AT lines.

It should read:

;************
$wksta=@wksta
$a=substr($wksta,5,2) ;take last two char
$what_rm=val($a) ;change to number

if $what_rm > 30
AT (4,4) "This is connecting to U18"
addprinterconnection(\\upperserver\EpsonU18)
addprinterconnection(\\upperserver\KyoU18)
else
At (4,4) "This is connecting to U26"
addprinterconnection(\\upperserver\KyoU26)
addprinterconnection(\\upperserver\EpsonU26)
endif
;******************

Sorry!!
Rgds
Don