pengshu 发表于 2016-4-12 12:19:43

在ppt2000中能运行的代码在ppt2003中不能运行,是什么原因?

我在2003中把宏的安全设置设置为低了,还是不行,以下是那句代码:Set fs = CreateObject("Scripting.FileSystemObject")运行时提示:运行时错误'429'ActiveX部件不能创建对象。以下是添加七个文本控件(名称分别为xh,xm,zz,yw,sx,yy,sw)和一个命令按钮后在命令按钮中的全部代码:Private Sub CommandButton1_Click()Dim readdate, writedata As StringDim textline1readdata = ""writedata = xh.Text + " " + xm.Text + " " + zz.Text + " " + yw.Text + " " + sx.Text + " " + yy.Text + " " + sw.TextSet fs = CreateObject("Scripting.FileSystemObject")Open "教师情况.txt" For Input As #1Do While Not EOF(1)Line Input #1, textline1readdata = readdata + textline1 + vbCrLfLoopClose #1Set a = fs.CreateTextFile("教师情况.txt", True)a.Writeline (readdata + writedata)a.CloseDim TextLinejlxs.Text = ""Open "教师情况.txt" For Input As #1Do While Not EOF(1) Line Input #1, TextLine jlxs.Text = jlxs.Text + TextLine + vbCrLf LoopClose #1End Sub
页: [1]
查看完整版本: 在ppt2000中能运行的代码在ppt2003中不能运行,是什么原因?