Solved

Printer.PaperBin Error

Posted on 1997-04-09
5
511 Views
Last Modified: 2012-08-13
I am using VB4/32 Enterprise EditionWhy can't I set Printer.PaperBin at runtime? Acording to HELP I can, but every time I try I get an error "Run-time Error 380 - Invalid Property Value". I have tried a couple of printers and all possible PaperBin settings.Please Help - its becoming urgent!!I have a project with one form, which is the startup form.Nothing is on the form!In Form_Load I have the following code:MsgBox(Printer.PaperBin) 'gives result of 11Printer.PaperBin = 11    'get the errorThat's all there is to it. Nothing Fancy
0
Comment
Question by:rbroome
[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
  • 3
5 Comments
 
LVL 1

Expert Comment

by:PC-Alex
ID: 1425185
Could you give us the code lines, together with the Dim -
statements belonging to the code ?
0
 

Author Comment

by:rbroome
ID: 1425186
Edited text of question
0
 

Author Comment

by:rbroome
ID: 1425187
Edited text of question
0
 

Accepted Solution

by:
skizz earned 100 total points
ID: 1425188
This is a serious bug in VB4 32, which also occurs in VB5. There is no workaround except to go direct to the API.

Printer.Paperbin will always work in VB416, even half way through a print job. Printer.Paperbin will never work in VB432. Printer.Orientation will still work in VB432.

In VB5, the first call to change the Paperbin or Orientation will work. No calls will work after a newpage, or any printing to the first page.

We (my colleagues at work) have registered this bug with MS. They have confirmed that it is indeed a bug. They have not yet replied with a date for a fix. (It was registered by us the day after the release of VB5).

Code sample:

'This call works in VB416, and VB5, but not VB432
'VB432 gives Invalid Property Value
Printer.Paperbin = vbPRBNUpper
Printer. Print "Test1"

Printer.Newpage

'This call works in VB416,but not VB432 or VB5
'VB432 gives Invalid Property Value
'VB5 gives Property may not be changed in the middle of a page
Printer.Paperbin = vbPRBNLower
Printer.Print "Test2"
Printer.Enddoc

0
 

Author Comment

by:rbroome
ID: 1425189
Thanks for confirming it as a bug. I have also reported it to Microsoft (Australia). As yet they haven't officially acknowledged it.
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…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
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…
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…

756 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