We have a number of VBA Projects (and at least one compiled add-on for InRoads) that were tested for Ss10 and some even migrated to ORD CONNECT. Recently, our users reported that these were failing to work as before. The tools perform some of their functions, but others fail. To test my theory that a Windows Update may have broken these tools, I took advantage of the fact that my home PC is still running Windows 7 and therefore has not had any recent Windows updates.
At least one of these tools functions perfectly on my HOME PC, which does not seal the deal, but it does not eliminate it as a strong possibility.
Has anyone seen a similar occurrence on their systems and have any suggestions. Unfortunately, the programmer responsible for this tools creation is not available to assist us in fixing this. As for the compiled tool, our eventual migration Open Roads will eliminate its use, but we are far from there yet. But in a similar situation, we do not have a contract vehicle to get the tool fixed if it requires recompiling and/or code modifications.
Many of our tools have error logging built in, this is what it showed yesterday when I ran it. I suspect the later errors are related to one or more earlier errors where an expected object fails to get created. One issue that I notice that instead of the project name, the first error lists APC.ApcHost.6. I do not understand what that is and why. Notice the rest list the project name - LandXML. There does not appear to be any code using that text - APC.ApcHost.6.
09/09/2021 12:49:48 PM crheault SHAOHDPCE10722 [APC.ApcHost.6]clsSOTable - CreateBubbleLabel ERROR -2147467262: Index not found. The specified index or name does not exist in the collection.09/09/2021 12:49:49 PM crheault SHAOHDPCE10722 [LandXML]clsSOTable - CreateBubbleLabel ERROR 430: Class does not support Automation or does not support expected interface
(Note that this last line repeats 21 X. See next paragraph to explain where the 21 times probably comes from.)
09/09/2021 12:49:51 PM crheault SHAOHDPCE10722 [LandXML]clsSOTable - FormatTable ERROR 91: Object variable or With block variable not set09/09/2021 12:49:51 PM crheault SHAOHDPCE10722 [LandXML]clsSOTable - IPrimitiveCommandEvents_Dynamics ERROR 9: Subscript out of range09/09/2021 12:49:51 PM crheault SHAOHDPCE10722 [LandXML]clsSOTable - FormatTable ERROR 91: Object variable or With block variable not set09/09/2021 12:49:53 PM crheault SHAOHDPCE10722 [LandXML]clsSOTable - IPrimitiveCommandEvents_Dynamics ERROR 9: Subscript out of range09/09/2021 12:49:53 PM crheault SHAOHDPCE10722 [LandXML]clsSOTable - FormatTable ERROR 91: Object variable or With block variable not set
This is supposed to place bubbles callouts on vertices of a shape and then create a table listing them in order with station, offset and coordinates. There were 21 vertices on the shape - the bubbles fail to get created, as does the table. it does create a list of the text for the table which allows it to be saved as a text file.
Hi Chuck,
Have you checked that any references are all correctly pathed (i.e. VBA IDE Tools\References)?
They all appear to be. None show as "Missing". I cannot read all of the paths as the dialog box is too narrow for some. So I may need to do some detective work. A comparison between my home PC and Office PC look to be identical. The tool is password protected, so its unlikely anyone accidentally modified something.
We are going to reinstall the programs on a test PC and see if that fixes it. Searching Google for APC.ApcHost.6 has not really been fruitful either. Most hits seem to have code that specifically call out some APC property or method. I cannot find any evidence that there is similar code in this project.
It has 14 forms, 15 modules and 32 class modules!
Charles (Chuck) Rheault CADD Manager
MDOT State Highway Administration
caddcop said:It has 14 forms, 15 modules and 32 class modules!
Jan Šlegr said:My experience with VBA is so bad that I never use it (and do not recommend as well) for anything more than simple macros
Jan's comment may point to a solution. I agree with him: on the couple of occasions when I have been obliged to work with a large VBA project the ability of VBA to self-destruct is astonishing.
caddcop said:a Windows Update may have broken these tools
VBA is perfectly able to break itself without the help of a Windows update.
Microsoft itself has admitted that VBA projects are 'full of air'. I have observed anomalies when a VBA project becomes confused about its identity. Rebuild your projects to compress and reorganize them.
You need to be rigorous in creating a file structure for the following steps, so files end up in the right place...
What the above, admittedly tedious, process does is to enable VBA to recompile each project's contents. It eliminates spurious problems, such as the one you report, and leaves you with a clean sheet.
Regards, Jon Summers LA Solutions