我的程序是这样子的
bat 生成个文件a,然后程序检测,提取其中的数据,接着再运行,a文件,在检测,提取·
num = 3
a1 = xlsheet.Cells(num, 1)
Do Until num = 7
Dim filename As String
filename = File1.Path & "\" & "screen.inp"
Open filename For Output As #1
Print #1, ………………
Close #1
Shell "x.bat"
Call aa(m1, dm1)
Call cc(c10, d10)
mysheet.Cells(num, 5) = d10
mysheet.Cells(num, 4) = c10
mysheet.Cells(num, 3) = dm1
mysheet.Cells(num, 2) = m1
num = num + 1
Loop
问题出现 主要是 shell "x.bat"文件 我算完了之后 ,所有结果都是最后一次运行的x.bat文件生成的数据