Solved

Kodak library scanning funtionality

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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
VBA color chart bars 12 66
MsgBox 2 37
Saving history changes to sub form 4 26
Modifying Conditional Format from VBA code 3 31
I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
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…
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…

760 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now