Solved

PaperBin property problem

Posted on 1997-11-25
2
258 Views
Last Modified: 2012-06-27
I am trying to work with the Printer object in VB4 32bit and any time I set the PaperBin to any value other than zero I get an error. Now I have tryed this while using each of our 5 printers (2 with only one paper tray, 2 with 2 trays, 1 with 4 trays). There is a Xerox, Tektronix, and 3 HPs.

Any ideas? I am using the vbPRBN???? constants to change this value, but I have also tried entering values directly and get the same effect. Error on any value other than zero.

Any suggestions would be welcome.
0
Comment
Question by:schworak
2 Comments
 
LVL 8

Accepted Solution

by:
mrmick earned 40 total points
ID: 1442447
I bet it's a syntax problem.  The correct line should look like this:

Printer.PaperBin = vbPRBNUpper

Note: This won't work in the immediate window because this property is READ ONLY at design time - but READ/WRITE at run time.

If you're getting an error "Invalid property value 380" error, the paperbin isn't available on the printer.

Try creating a new project for testing and put two labels and two command buttons on Form1, Put in the one of the command buttons click events the following code:

   Printer.PaperBin = vbPRBNUpper
   Label1 = Printer.DeviceName
   Label2 = Printer.PaperBin

And in the other put:

   Printer.PaperBin = vbPRBNLower
   Label1 = Printer.DeviceName
   Label2 = Printer.PaperBin

This will help you to verify you've got the correct printer selected.

Hope this helps.
0
 
LVL 3

Author Comment

by:schworak
ID: 1442448
That code also failed.

It turns out that the problem was I wasn't setting this...

         Printer.TrackDefault = FLASE

This little item isn't in the manual from what I can find. The only way I found it is I went through each and every property reading all about how they work. This didn't out right say I had to do it but I tried it and PROBLEM SOLVED! Woo Hoo!

0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
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.
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 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…

778 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