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

cyh1898 2006-01-25 04:52:36
我在2003中把宏的安全设置设置为低了,还是不行,以下是那句代码:
Set fs = CreateObject("Scripting.FileSystemObject")
运行时提示:运行时错误'429'
ActiveX部件不能创建对象。

以下是添加七个文本控件(名称分别为xh,xm,zz,yw,sx,yy,sw)和一个命令按钮后在命令按钮中的全部代码:
Private Sub CommandButton1_Click()
Dim readdate, writedata As String
Dim textline1
readdata = ""
writedata = xh.Text + " " + xm.Text + " " + zz.Text + " " + yw.Text + " " + sx.Text + " " + yy.Text + " " + sw.Text
Set fs = CreateObject("Scripting.FileSystemObject")
Open "教师情况.txt" For Input As #1
Do While Not EOF(1)
Line Input #1, textline1
readdata = readdata + textline1 + vbCrLf
Loop
Close #1
Set a = fs.CreateTextFile("教师情况.txt", True)
a.Writeline (readdata + writedata)
a.Close
Dim TextLine
jlxs.Text = ""
Open "教师情况.txt" For Input As #1
Do While Not EOF(1)
Line Input #1, TextLine
jlxs.Text = jlxs.Text + TextLine + vbCrLf
Loop
Close #1
End Sub
...全文
186 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
cyh1898 2006-01-29
  • 打赏
  • 举报
回复
追加50分谢谢你。
还有一个问题麻烦你一下:http://community.csdn.net/Expert/topic/4534/4534946.xml?temp=.4856073
cyh1898 2006-01-29
  • 打赏
  • 举报
回复
高手
northwolves 2006-01-29
  • 打赏
  • 举报
回复
1.搜索: c:\windows\system32\scrrun.dll 存在与否,没有则下载之http://www.dll-files.com/dllindex/
2 注册 scrrun.dll
regsvr32 scrrun.dll
3 注册完毕后 到 VBE 窗口 引用Scripting Runtime

5,139

社区成员

发帖
与我相关
我的任务
社区描述
其他开发语言 Office开发/ VBA
社区管理员
  • Office开发/ VBA社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧