sheslop
asked on
Kodak library scanning funtionality
im attempting to access an epson scanner through use of the kodak library but im having trouble working out all the methods and properties of the library.
i have the following:
Dim Scanner as ImgScan
If Scanner.ScannerAvailable Then
MsgBox "Success"
End If
at the point "Scanner.ScannerAvailable" i always get the error:
"Run-time error 91"
"Object Variable or With Block Variable not set"
what do i assign the object "Scanner" to?
cheers,
simon
i have the following:
Dim Scanner as ImgScan
If Scanner.ScannerAvailable Then
MsgBox "Success"
End If
at the point "Scanner.ScannerAvailable"
"Run-time error 91"
"Object Variable or With Block Variable not set"
what do i assign the object "Scanner" to?
cheers,
simon
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Before checking for if scanner.scanneravailable you should create the object. That is done using the NEW keyword.
Alternatively you can do it as below,
Dim Scanner as ImgScan
set Scanner = New ImgScan
If Scanner.ScannerAvailable Then
MsgBox "Success"
End If
Alternatively you can do it as below,
Dim Scanner as ImgScan
set Scanner = New ImgScan
If Scanner.ScannerAvailable Then
MsgBox "Success"
End If
2nd method is what mani_m_in has told
Dim Scanner as New ImgScan 'Notice New is added
If Scanner.ScannerAvailable Then
MsgBox "Success"
End If
Cheers
Narayanan