I am having trouble closing an application (scan.exe) which I am running from access in VB. Here is what I tried:
application.quit (this closed access!)
scan.application.quit (error message)
Any help would be greatly appreciated.
Hanss
Zurich
Here is my code:
Public Function test(strfile1 As String)
Shell "C:\program files\scan\scan.exe"
Dim App As Object
Set App = CreateObject("Scan.Application")
Dim Worksheet As Object
Dim hw1b2 As Object
Set hw1b2 = App.OpenImage(strfile1)
Dim Left0(1) As Long
Left0(0) = 34
Dim Right1(1) As Long
Right1(0) = 255
ResultCode = hw1b2.testObjects(1)
Set Worksheet = App.GetWorksheet
'Worksheet.MakePermanent
ResultCode = Worksheet.SaveAs("C:\temp.xls")
??? I would like to know what I have to put here to make scan.exe close.
End Function
application.quit (this closed access!)
scan.application.quit (error message)
Any help would be greatly appreciated.
Hanss
Zurich
Here is my code:
Public Function test(strfile1 As String)
Shell "C:\program files\scan\scan.exe"
Dim App As Object
Set App = CreateObject("Scan.Application")
Dim Worksheet As Object
Dim hw1b2 As Object
Set hw1b2 = App.OpenImage(strfile1)
Dim Left0(1) As Long
Left0(0) = 34
Dim Right1(1) As Long
Right1(0) = 255
ResultCode = hw1b2.testObjects(1)
Set Worksheet = App.GetWorksheet
'Worksheet.MakePermanent
ResultCode = Worksheet.SaveAs("C:\temp.xls")
??? I would like to know what I have to put here to make scan.exe close.
End Function