MS Excel - VBA Automation Error. - vba

I have a suite of MS-Excel scorecard calculators that I send to 200 odd clients. In all client environments save 1 the calculators work 100%. However one client is experiencing the following problem.
Periodically the spreadsheet gets a Microsoft Visual Basic Run-Time Error. The exact message is:
Microsoft Visual Basic
Run-time error '-2147417848(80010108)':
Automation error.
As I mentioned, this happens only at one customer site. Everywhere else the spreadsheet runs 100%.
Can anyone shed some light as to why this happens at one site out of 200 odd.

It is possible to provide some diagnosis.
Do a search of user's system for any *.exd files. They may be in a hidden folder.
Delete any *.exd file you find. They are temporary files and will be rebuilt by Excel.
Try to run the file again. Sorry I can't provide more detailed help, but this is a start based on the information provided.

Related

Problem when trying to read EXCEL after implementing OFFICE 365 "Confidentiality Label"

I have an ETL routine in PENTAHO and I'm migrating to APACHE HOP.
But I came across a situation, the HOP step/plugin "Microsoft Excel Input" cannot read the data before I open the excel file and click confirm Add Confidentiality Label.
In PENTAHO PDI this problem does not occur, does anyone have any tips?
IMG 1
After clicking and adding a confidentiality label like "public" for example and saving and closing the file, the process works perfectly.
Note: This only happens with some files.
This sounds like a problem that will not have a clear and direct answer and will require some changes in the code.
The code for Apache Hop is managed on Github.
You can create an issue there and one of the developers will help you get this sorted out. When creating a ticket please be as specific as you can be and add a sample, that will improve the chances of getting a fix on short notice.

Compiled Access Program Runs Fine on 7 Computers but Crashes on 3 others

I have written a rather complex application in Microsoft Access. It is split into front end and back end files. To protect my code, I have compiled it and saved it as a runtime .accde file, which I then changed to an .accdr file to ensure it operated as a runtime. I have created two versions of the application: one for those with 32-bit Office installed and one for those with 64-bit office. I have used Inno Setup to package the application, the data file, and other files such as the icon file, the license file, etc., into an installable package, which works just fine.
Among my team of 27 beta testers of this application, so far 6 have downloaded it, and I have tested it on four of my own computers. On seven of these computers, the installation works perfectly and the application runs with no problems.
On the computers of three of my testers, when they try to run it, they get this error message:
The expression On Open you entered as the event property setting produced the following error: Bad file name or number.
* The expression may not result in the name of a macro, the name of a user-defined function, or [Event Procedure].
I'm pretty sure I know where the code is that's causing the problem, but cannot for the life of me figure out why the application crashes on those 2 computers but not on others.
The On Open event I suspect of causing the problem checks the linked tables, gets their connect string, then looks at the path for that string for the back end database. If it does not find it there, the procedure pops up a file selector dialog and instructs the user to find the data file, then it relinks all the tables.
If anyone could point me in the right direction to fixing this problem, I would be extremely grateful.
This is typically caused by a reference labelled as MISSING.
You have two (three) options:
Run the application on the offending machines with a full version of Access that lets you debug the code
Create a small test application that lists and verifies the references you use, and run this on the offending machines
Remove those two customers
Thanks to all the contributors here. Because of these folks and additional online research, the latest answer I can find is this:
This error occurs on a small percentage of computers on which the app is installed, and no one has yet figured out why, what causes it, or how to fix it. The workaround is to install the 2013 version of the Access runtime, as later versions will still cause the problem.
At least one of the offending computers is running the Click-to-Run version of Office. Still gathering information, but that's the status as of now.

Office server automation failed while calling "CopyPicture" on some computers

We have wrote an application with C++/Qt which reads some data from multiple excel files and then generate a word report. We have used benefits of Office automation server to read/find and copy data from excel files and write them into a single word file.
The application works fine without any significant problem in my office computers. Yesterday I've decided to copy the app into my laptop which has same OS and office version. After running the app, it seems that somethings wrong my OS/Office. None of the data are copied into word file. After debugging I've figured out that the app actually can read/write office files but failed to call CopyPicture method of automation!!!
I wanted to copy the range as picture, so I have used "CopyPicture" method. but it seems that the vba fails to call copyPicture on my laptop.
I'll be very appreciated for any hints. Thank you
I've found the problem and it's with excel docs which are used to copy data from. In these files, there are some embeddedCharts. after removing these charts the code works fine!!!! (very odd). Anyway, I've tried to make excel file visible in order to see if the operation goes well or not. After running (with embeddedCharts) the code worked fine (more odd!!)
excel->dynamicCall("Visible", true );
I don't know the reason but with making excel file visible, the error with copyPicture is gone!

Excel Macro Compatibility Issue

I have added my macro to a already existing excel file with macros (build on lower version of excel). It is working fine on my system as well as other systems with same excel version. But when the excel file is opened in other versions, it either crashes or gives error messages like unexpected error occurred(32809)/ compile error. I am using Excel 2010 14.0.7143.500. Can any body tell me how to resolve this issue?
The Telemetry Log displays some simple information about the recorded events. Each record displayed in the Telemetry Log contains a title and lists the severity of the event displayed. For errors, the records also include a description of the error together with steps to address the issue. Keep in mind that not all of the records displayed represent errors caused by Office solutions; the Telemetry Log also shows when solutions and files are loaded or closed successfully.
For example, the issue titled "OM Hidden: Comment.Initial Property" appears if a solution or macro-enabled file opened in Word 2013 attempts to get the initials of a commenter who is associated with a comment. Word 2013 features an improved commenting experience that does not display commenter initials by default. The APIs associated with the older commenting model have been hidden in the Word 2013 object model but remain available for backwards-compatibility. The "OM Hidden: Comment.Initial" issue in the indicates the file that attempted to use the API, the application that raised the event (Word 2013), the time and date of the event, and short description about the error and how to fix it.

Strange automation? error in Word2007

I'm pulling my hair out because I've run into the following problem with one of my clients:
My program uses extensive VBA automation in Word. Macros are saved in a specific Word template that is attached to each document. Some of the macros save the current document to a temporary folder under [User]/AppData/Roaming/... for further processing.
The client is using Win7 with Office2007 (Student edition). On the computer in question I keep getting an error with something like "No permission to save the file" (can't give exact error message because I've translated it from my language to English)
This happens when the macro tries to "SaveAs" the document.
The strange thing is that it happens only 8 out of 10 times - and not all the time. There are no special permissions set for the temporary folder I'm trying to save to.
I've tried changing Word security settings, tried adding the folder to the trusted folders list, tried using a different folder - to no avail.
The client's computer has Norton Antivirus (or Internet Security, I dunno) installed but temporary disabling it didn't solve the problem. (I know I should only be sure after a full uninstall but I can't do that on the client's comp)
Any help is appreciated!
Update: I've since found the exact error message in English: "Word cannot complete the save due to a file permission error."
I'm now looking on the web for similar forum posts but if you guys know something, please let me know. Thanks!
Is an antivirus or similar program running? On my development computers many similar problems went away when I changed from (vendor "X" security bundle) to ESET.