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
Solved

Kodak library scanning funtionality

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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

839 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