Solved

Kodak library scanning funtionality

Posted on 2002-05-09
4
429 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

752 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