try Excel_xhggb_w.Close;except end;
Excel_xhggb_w:=tExcel_xhggb_w.Create(panel1);
......try xhggb_w.Close;except end;
xhggb_w:=txhggb_w.Create(panel1);
......我有很多这样的过程。我想用变量代替var 
  f1:tform;begin
f1:=xhggb_w;
try f1.Close;except end;
f1:=tf1.Create(panel1);
end;
f1:=tf1.Create(panel1);这句出错!