Solved

PaperBin property problem

Posted on 1997-11-25
2
253 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
Comment Utility
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
Comment Utility
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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

772 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

9 Experts available now in Live!

Get 1:1 Help Now