VB6 - determine source of error - error-handling

I have searched both the internet and VB6 "help" without being able to find anything I can get to work. I'd like to know the line in my code that causes an error.
Can someone please show me the code that would report the line in my code that causes an error?

Related

Tips for debugging a Global.mpt

Short Question:
How do you debug a large Global.MPT file?
Currently my script crashes when I try to open it from the toolbar. It appears the usual, not very helpful, error message regarding the automation error. When this happens I start the individual components by pressing F5 in the VBA window and at the latest then I find the erroneous line.
Now my code runs as it should but I can't find the error that the compiler* has.
How do you deal with this problem?
*Is it a compiler error?
Found a Solution here.
I didn't know that you can compile the code manually.
It showed that i missed to remove a call for a deleted Sub.

Automation Error - Catastrophic Failure when opening VB editor in Excel

Apologies if this question is a little vague - but I am struggling to find relevant information on the 'Automation Error - Catastrophic Failure' I am experiencing.
The code I have written is set to run when the workbook is open. The code appears so run as intended, with no errors. I have stepped through the code and checked it and I can't see any obvious problems or anything that is not behaving as it should.
The 'Automation Error - Catastrophic Failure' only occurs when I click the Visual Basic Editor on the excel tool bar.
The section of code is quite long so its not really feasible to paste it here, but I only get the error once when opening the editor, and then it does't appear again.
I'm not even sure where to start in debugging this or what this error exactly means in this instance?
Any input would be greatly appreciated!

Automation Error / Catastrophic Failure when debugging VSTO project

I'm building a document-level VSTO customization for an Excel 2016 workbook, and I'm encountering this error repeatedly in the development process. Basically, Visual Studio 2015 builds the project, Excel loads the workbook, and immediately Excel displays an "Automation Error / Catastrophic Failure" message. It kicks me into the VBA editor, but there's no code on the screen to edit.
I read in a few places that the error means there is something wrong with the "References" settings in the VBE, but it won't let me open that screen, the option is grayed out. Anything else I try to do just pulls that error up again. The only way out is to stop the process through Visual Studio. If I open the source workbook directly from the project folder, the same problem occurs, and I have to quit Excel via Task Manager.
This problem has been coming and going over the past 24 hours; last night and this morning it wasn't happening for some reason, so I was having no issues running and testing my project, but now the problem is back. If anyone has an idea of what could be causing this problem (bearing in mind it must be something that has not been constant over the past day), I'm all ears. Even just an idea of what to look for would be helpful, as I don't even know what this error means or what kinds of things to look for. This is my first VSTO project and I've been pretty excited by what I was able to accomplish when this error wasn't coming up every time, so I'd like to eliminate the problem permanently.
Edit: I should point out that the reason I included VSTO in the question title is that this workbook was totally fine before I started the VSTO project. But I saw this error when I tried to run the VSTO project for the first time, yesterday.
So, I think I "kinda-sorta" figured out my own problem. I'm still not 100% sure what caused it in the first place, but I'll leave this here for anyone else who runs into the same issue someday:
When you get this error, don't despair like I did because the VBE window has no code highlighted as the problem area. Look through ALL the VBA code in every object/module/sheet; in my case, I eventually found a function highlighted as the cause of the problem. I was able to bypass the error temporarily by turning off automatic calculations, and I commented out the offending function. It broke some things in my workbook to do so, but it gave me the opportunity to debug my VB.net code in Visual Studio, and when I uncommented the "problem" VBA function after doing so, it all worked perfectly fine.

Verify answer from Google calculator using Selenium

I have just started using Selenium IDE and I am trying to open the Google search engine and type in a sum (example 5+7). This will open a result page with a calculator and the answer in it.
So far the test works but when I try to verify that the answer is correct I am getting an error even though it is. Basically I am highlighting the answer, right clicking on it and clicking verifyText. Similarly if I click on the text box holding the answer and choose verifyElementPresent I get an error as well.
Can someone please enlighten me on why I am getting these errors.
P.S I am new to Selenium so I would appreciate it if your answer is kept simple
Thanks in advance :)
You are getting the error because of the latency time.
Just add a waitForElementPresent keyword before validating the result.
It Workss...
Happie learning. :)

wxWidgets errors occur after upgrading gDEBugger

all. Today I upgraded my gDEBugger (though I don't think it involves gDEBugger) to the latest version but problem occurs. When I tried to open gDEBugger, an alert window named "wxWidgets Debug Alert" pop-up, reporting that "....\src\common\xpmdecod.cpp(822):assert "i==colors_cnt" failed in wxXPMDecoder::ReadData(). Call stack: [00]wxConsole....balabala....", like follows.
All these words seem just like warnings and didn't affect the following work, however I am wondering why this problem occurs? What's the root cause? I am not familiar with wxWidgets and hopes those guru on it can help me resolve it.
You've got a malformed XPM. As XPMs are typically embedded into the program itself, this is not supposed to happen, look at the XPMs used by gdPerformanceCountersDialog::createAndLoadImageList() to check this.
P.S. Next time you could just press Ctrl+C to copy the message box contents to clipboard as text instead of pasting in an image.