Page 1 of 1

Run-time error 55

Posted: Thu Feb 02, 2006 5:08 pm
by msalperen
If your CMDLINE and SET lines in your macro code are not correctly ordered, you may encounter "run-time error 55 (file already open)". For example if your code is something like this:

VERSION BUILD=5010115
TAB T=1
TAB CLOSEALLOTHERS
CMDLINE !DATASOURCE Dosya.csv
SET !DATASOURCE_COLUMNS 10
SET !DATASOURCE_LINE {{line}}
CMDLINE !VAR1 x

CMDLINE !VAR2 y
CMDLINE !VAR3 z
URL GOTO=http://www.ausefulweb.org/
SIZE X=1004 Y=723

you may get the error above (runtime 55), that means, the code will try to read the cvs file that is already opened. So, if this is the case you should change your code as (the difference is signed with red colour):

VERSION BUILD=5010115
TAB T=1
TAB CLOSEALLOTHERS
SET !DATASOURCE_COLUMNS 2
SET !DATASOURCE_LINE {{line}}
CMDLINE !DATASOURCE Dosya.csv
CMDLINE !VAR1 x

CMDLINE !VAR2 y
CMDLINE !VAR3 z
URL GOTO=http://www.ausefulweb.org/
SIZE X=1004 Y=723

I hope that this information will be useful for those who encounter runtime 55 error

Cheers :)