环球网校是美国纳斯达克上市企业欢聚时代(NASDAQ:YY)旗下品牌 | 住房和城乡建设部 建筑人才培训合作单位
您现在的位置在: > 计算机类 > 计算机等级考试 > 考试辅导 >

2011年计算机等考二级VB辅导(26)

2011-07-23 来源:互联网 作者:第一考试网

2011年计算机等考二级VB辅导(26) #

一组有用的操作Excel的函数

#

在用VB做程序的时候,它本身的报表并不太好使用,因此应用Excel输出数据,是一个好方法,以下是一组操纵Excel的函数据,希望能帮助大家. #

'Excel VBA控制函数 #

'Write By WeiHua 2000.10.12

#

'检测文件 #

Function CheckFile(ByVal strFile As String) As Boolean #

Dim FileXls As Object

#

Set FileXls = CreateObject("Scripting.FileSystemObject")

#

If IsNull(strFile) Or strFile = "" Then

#

CheckFile = False

#

Exit Function

#

End If

#

If FileXls.FileExists(strFile) = False Then

#

CheckFile = False #

Set FileXls = Nothing

#

Exit Function #

Else

#

CheckFile = True #

Set FileXls = Nothing

#

End If #

End Function #

责编: 返回顶部  打印

关于我们联系我们友情链接网站声明网站地图广告服务帮助中心