Solved

run time error 2147417848 VB6  ShowPrinter

Posted on 2013-10-30
2
796 Views
Last Modified: 2013-10-31
I have been running this line of code in my program for over 10 years running XP/Vista/7/8.

CommonDialog1.FLAGS = CommonDialog1.FLAGS - &H900000
CommonDialog1.ShowPrinter

Now I'm getting this error message
"run time error 2147417848 (80010108':
Method 'ShowPrinter' of object 'ICommonDialog' failed"

I had gotten this message in the past but when I would restart the program is would than work. Now it doesn't work at all.

I did a Google search only ten results and no answer.

I hope an expert can solve this for me soon.

Thanks
primtererror.JPG
0
Comment
Question by:slwebber99
2 Comments
 
LVL 15

Accepted Solution

by:
eemit earned 500 total points
ID: 39613757
You should use a valid Flags Property for Print Dialog e.g.:

CommonDialog1.Flags = cdlPDDisablePrintToFile Or cdlPDNoSelection
CommonDialog1.ShowPrinter

Open in new window


These constants are listed in the Microsoft CommonDialog Control (MSComDlg) object library in the Object Browser (F2), "PrinterConstants".
0
 

Author Closing Comment

by:slwebber99
ID: 39614208
Thank you very much. It now works.
0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

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

I annotated my article on ransomware somewhat extensively, but I keep adding new references and wanted to put a link to the reference library.  Despite all the reference tools I have on hand, it was not easy to find a way to do this easily. I finall…
Today, still in the boom of Apple, PC's and products, nearly 50% of the computer users use Windows as graphical operating systems. If you are among those users who love windows, but are grappling to keep the system's hard drive optimized, then you s…
The viewer will learn how to create multiple layers to apply various filters and how to delete areas from each layer’s filter.
The viewer will learn how to successfully download and install the SARDU utility on Windows 7, without downloading adware.

808 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