Solved

Kodak library scanning funtionality

Posted on 2002-05-09
4
431 Views
Last Modified: 2012-08-13
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
0
Comment
Question by:sheslop
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 

Accepted Solution

by:
mani_m_in earned 200 total points
ID: 7000633
Hello Simon,

         In your Coding u r declaring a variable Scanner as ImgScan. But u have to initialise the variable. thatswhy u r getting this error .

"Object Variable with block variable not set." .

Try to initialize the Scanner Variable. The coding for initialization is

  Set Scanner=new ImgScan

I think this code will work.
0
 
LVL 3

Expert Comment

by:n_narayanan
ID: 7001229
Or

Dim Scanner as New ImgScan 'Notice New is added

If Scanner.ScannerAvailable Then
   MsgBox "Success"
End If


Cheers

Narayanan
0
 
LVL 3

Expert Comment

by:n_narayanan
ID: 7001234
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

0
 
LVL 3

Expert Comment

by:n_narayanan
ID: 7001237
2nd method is what mani_m_in has told
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Suggested Courses
Course of the Month5 days, 23 hours left to enroll

626 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question