[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

VB6: Web Browser Control run-time error "-2"

Posted on 2009-05-04
1
Medium Priority
?
654 Views
Last Modified: 2013-11-19
I am using a Web Browser control in VB6, and it consistently gives me a Run-time error with an error number that is always negative, small, and even (-2, -4, -6, etc.).  Even though I have placed an ON ERROR directive in every routine involving the browser, I consistently get this Run-time error without the opportunity to capture the error and debug the code: the dialog box gives me only an OK and Help button: pressing Help does absolutely nothing; and pressing OK terminates the program.  Using the Web Browser is the place and time that I experience this peculiar behavior, and it happens with great consistency.  
I am more than willing to share more information and, if ncessary, upload the program on EE's web site for perusal.  For my first pass, I'll simply ask if any of you have ever encountered this error before, and what you've done.
Thanks, ~Peter Ferber
RuntimeError.bmp
0
Comment
Question by:PeterFrb
[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
1 Comment
 

Accepted Solution

by:
PeterFrb earned 0 total points
ID: 24298317
I've answered my own question!  I had a "clean-up" routine to finish off some processes.  As browsers are more prone than most objects to interrupting a given event to perform some more recent event, I believe my code put itself into a loop.  It successfully navigated to the first site, but it was in trouble at that point; and with the next navigation, it gave the error shown above.  
As a general rule, I would say to be very careful to code each event process very specifically, and don't, if possible, have events calling one's own contained routines.  In the event that another event arbitrarily interrupts the self-contained routine, the results will be sporadic, unpredictable, and prone to untrackible errors.
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

Does your audience prefer people in photos or no people? How can you best highlight what you’re selling? What are your competitors doing, and what can you do that is different and unique from them?  Continue reading to learn how to make your images …
Dramatic changes are revolutionizing how we build and use technology. Every company is automating, digitizing, and modernizing operations. We need a better, more connected way to work together as teams so we can harness the insights from our system…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
Suggested Courses

656 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