Solved

Printer.PaperBin Error

Posted on 1997-04-09
5
506 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
  • 3
5 Comments
 
LVL 1

Expert Comment

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

Author Comment

by:rbroome
Comment Utility
Edited text of question
0
 

Author Comment

by:rbroome
Comment Utility
Edited text of question
0
 

Accepted Solution

by:
skizz earned 100 total points
Comment Utility
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
Comment Utility
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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
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…
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…

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

14 Experts available now in Live!

Get 1:1 Help Now