您的位置:程序门 -> vb -> 基础类



求助


[收藏此页] [打印本页]选择字色:背景色:字体:[][][]


求助
发表于:2007-05-08 16:03:18 楼主
run-time   error   '438 '
object   doesn 't   support   this   property   or   method

这是怎么回事呢
为什么不支持这种格式

在下列代码之后发生的

activeform.rtftext.loadfile   sfile   '把内容写到rtftext文档上
activeform.caption   =   sfile     '显示文件名于窗体上
发表于:2007-05-08 16:57:451楼 得分:0
你的sfile是什么格式?

文本格式是没问题的

private   sub   form_load()
    dim   strfile   as   string
    strfile   =   "c:\test.txt "
    me.richtextbox1.loadfile   strfile
    me.caption   =   strfile
end   sub


上面是说不支持属性或者方法
发表于:2008-01-13 01:15:412楼 得分:0
翻译:
object   doesn   't   support   this   property   or   method  
对象         不                 支持           这个     属性             或   方法

activeform.rtftext.loadfile       sfile       '把内容写到rtftext文档上  
activeform.caption       =       sfile           '显示文件名于窗体上

估计是第一句出错吧,第二句怎么看都不像是会犯错的东西
首先:是否指定文件存在
其次:文件格式是否支持

估计你是用的richtext控件,最复杂只能支持到rtf文档,你要是想打开doc,那就会出问题了


快速检索

最新资讯
热门点击