答案 0 :(得分:2)
将您的workbook open
子信息放在 ThisWokrbook 中,而不是放在表格中。
将此添加到 ThisWorkbook
Private Sub Workbook_Open()
Run "OpenSheet"
End Sub
并在模块中添加:
Sub OpenSheet()
'Activate Workbook
Workbooks("urworkbook.xls").Activate
'Activate Worksheet
Workbooks("urworkbook.xls").Sheets("urSheet").Activate
End Sub
答案 1 :(得分:-2)
仅对Workbook_Open过程进行了一些改进: (它将像真实应用程序一样显示全屏)
proc iml;
losses =0;
i=1;
do while (losses<1000);
x[i,1]= some statement;
x[i,2]= some statement;
......
x[i,10]= some statement of profit/loss;
if x[i,10]<0 then losses=losses+1;
i=i+1;
end;
quit;