Link to home
Start Free TrialLog in
Avatar of sheslop
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
ASKER CERTIFIED SOLUTION
Avatar of mani_m_in
mani_m_in

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Or

Dim Scanner as New ImgScan 'Notice New is added

If Scanner.ScannerAvailable Then
   MsgBox "Success"
End If


Cheers

Narayanan
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

2nd method is what mani_m_in has told