Solved

PaperBin property problem

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

MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

Question has a verified solution.

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

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.
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 utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

733 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