|
-
Oct 8th, 2001, 02:55 AM
#1
Thread Starter
New Member
Excel as an object server - problems
help...
I am using the Excel 9 object library as part of an application I've written. I use the function below to check this is a valid Excel spreadsheet. Every time I call this, Windows starts another instance of Excel.EXE, and doesn't terminate it when I'm finished. This is a major pain. Any ideas ? (NOTE - this is the only code which uses the Excel object model at present - I'm not even doing anything yet !)
Public Function IsValidExcelFile(ByVal vstrFileName As String) As Boolean
Dim objBook As Excel.Workbook
On Error GoTo handler
IsValidExcelFile = False
Set objBook = Excel.Workbooks.Open(vstrFileName)
IsValidExcelFile = True
handler:
Set objBook = Nothing
End Function
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|