标题:【求助】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



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-280347-1-1.html




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

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