| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 563 人关注过本帖
标题:【求助】vbs问题
取消只看楼主 加入收藏
弓虽人
Rank: 1
来 自:江苏南通
等 级:新手上路
帖 子:19
专家分:0
注 册:2008-11-9
结帖率:100%
收藏
已结贴  问题点数:20 回复次数:3 
【求助】vbs问题
vbs对话框点取消后出现数组越界


flag=&h200
whichone=openfile("choose a file","c:\","Everything|*.*|Text Files|*.txt|Word-Documents|*.DOC",2,flag)
msgbox "raw data returned:"&whichone

whichone=split(whichone," ")
path=whichone(0)
filecount=ubound(whichone)
if filecount=0 then
        msgbox "you selected one file:"&whichone(0)
        msgbox "returned flag:"&flag
        if(flag and 1) then
                msgbox "readonly selected"
        else
                msgbox "readonly not selected"
        end if
        if(flag and 1024) then
                msgbox "selected file is not txt file!"
        else
                msgbox "selected file is of default type!"
        end if
else
        msgbox "you selected "&filecount&" files!"
        for x=1 to ubound(whichone)
                list=list&path&whichone(x)&vbcr
        next
        msgbox list
end if

function openfile(title,dir,filter,index,flags)
        set comdlg=createobject(")
        comdlg.filter=filter
        comdlg.filterindex=index
        comdlg.flags=flags
        comdlg.maxfilesize=260
        comdlg.cancelerror=false
        comdlg.dialogtitle=title
        comdlg.initdir=dir
        comdlg.defaultext="txt"
        comdlg.showopen
        openfile=comdlg.filename
        flags=comdlg.flags
end function
搜索更多相关主题的帖子: vbs 
2009-07-24 01:39
弓虽人
Rank: 1
来 自:江苏南通
等 级:新手上路
帖 子:19
专家分:0
注 册:2008-11-9
收藏
得分:0 
没人回答吗???
2009-07-24 16:26
弓虽人
Rank: 1
来 自:江苏南通
等 级:新手上路
帖 子:19
专家分:0
注 册:2008-11-9
收藏
得分:0 
回复 3楼 bczgvip
vbs对话框点取消后出现数组越界
2009-07-24 20:03
弓虽人
Rank: 1
来 自:江苏南通
等 级:新手上路
帖 子:19
专家分:0
注 册:2008-11-9
收藏
得分:0 
回答 为什么 vbs对话框点取消后出现 数组越界
2009-07-24 20:04
快速回复:【求助】vbs问题
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.012479 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved