Solved

PaperBin property problem

Posted on 1997-11-25
2
259 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone 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

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 …
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
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…

792 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