?
Solved

PaperBin property problem

Posted on 1997-11-25
2
Medium Priority
?
264 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
[X]
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
2 Comments
 
LVL 8

Accepted Solution

by:
mrmick earned 80 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
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…
Suggested Courses
Course of the Month12 days, 15 hours left to enroll

777 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