Origin Ver. : OriginPro8 Sr4
Operating System: Xp Sp2
Hi everybody!
I’d like to perform an exist test before running a script.
page.active$=Fitted_Datas;
if (page.active$!="Fitted_Datas")
{type "Fitted_Datas doesn’t exist" ;
run.section(FitScript, Main); //FitScript works fine without the test condition
};
else { type "Fitted_Datas exist. Please rename the wks.";};
return #Command Error! If Fitted_Datas worksheet doesn’t exist and it stops the script. (I understand that point)
I also tried this code :
str$="Fitted_Datas";
if (exist(str$)!==2)
…
But exist(str$) always return 0. No matter Fitted_Datas exist or not
And if I use "str$="[Book1]Fitted_Datas";", exist(str$) will always return 2.
I would be very pleased to get any tips.
Thank you for your help.