一組有用的操作Excel的函數(shù)
在用VB做程序的時(shí)候,它本身的報(bào)表并不太好使用,因此應(yīng)用Excel輸出數(shù)據(jù),是一個(gè)好方法,以下是一組操縱Excel的函數(shù)據(jù),希望能幫助大家。
‘Excel VBA控制函數(shù)
’Write By WeiHua 2000.10.12
‘檢測(cè)文件
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
在用VB做程序的時(shí)候,它本身的報(bào)表并不太好使用,因此應(yīng)用Excel輸出數(shù)據(jù),是一個(gè)好方法,以下是一組操縱Excel的函數(shù)據(jù),希望能幫助大家。
‘Excel VBA控制函數(shù)
’Write By WeiHua 2000.10.12
‘檢測(cè)文件
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

