Issues switching between different versions of Excel - excel

We recently had a new employee join our (very small) company, and he is using Excel 2010 while the rest of the office uses Excel 2016.
When he attempts to run a macro which draws a chart, he gets an error message that says:
Compile Error - Method or Data member not Found
However, this error message doesn't appear when I run the exact same macro in Excel 2016.
The line of code which appears to be throwing up a problem is the following:
ActiveChart.FullSeriesCollection(1).Format.Line.ForeColor.ObjectThemeColor = msoThemeColorText2
Has anyone come across this problem before? And is there any quick solution, besides the obvious of switching him to Excel 2016 like the rest of us?
Thanks in advance.

Related

Microsoft Excel keeps repairing my .xlsm file for no apparent reason and eliminates data validations on a sheet

I recently created an automated Excel utility (using Microsoft Office 2019), in which I've extensively used data validations, VBA code, named ranges and formatting. It was working well until one day I received an Excel prompt message that read:
When I click on Yes, it gives me another pop-up where it says it recovered the file, and also gives me a link to the error log XML file. I click on it and open the .xml file using my default browser, and it shows the following details:
Looks like it is removing data validations from a particular sheet, and I realize that is true when I navigate to that sheet in the UI. To work around this unwarranted and repeated data-validation removal that Excel application is enforcing, I created a macro code that will re-instate all these data validations as required. The real problem arises when this Excel file is opened on a different computer with Microsoft Office 365. Looks like it is removing not just data-validations but also other components like named ranges and buttons. There could be other things that it might be removing, which I am unaware of at the moment. So the macro created to re-instate the data-validations is no longer useful.
Why does this problem arise? And why is different version of Excel behaving differently? How do I solve this? Appreciate your kind help. Thank you!
As rightly suggested by Ron Rosenfeld and e_conomics, the issue was with the data validation lists, whose sources were strings of comma separated values that were going beyond 255 characters. Apparently, that is a limitation with Excel.
When I replaced the sources of data validation lists (string of comma separated values) with the ranges containing the corresponding values, the problem resolved itself. The repair dialogue never appeared again.

Diffrence between opening excel file path with or without quotas

I got a recent problem with Excel.
We are working with macros and it is in a Citrix envoirment.
We are filling an Excel sheet with data that works perfectly fine.
But our coworkers have made themself templates which are getting filled.
Now if you choose the template to be filled it is first pretty slow and then actually freezes/crashes.
What I have recognized when you choose the template like \server\folder\template.xls it crashes but if you choose it like "\server\folder\template.xls" it doesnt but the templates seem not to work as their saved macros won't run.
But what else diffrences between those two Options.
Is it really only macros?
As it seems, we had a problem with the excel Installtion.
There was a problem between Excel 2016 32bit, Excel 2016 64bit and Excel 365.
We made a new clear installation with excel 365 and it worked again.
Therefore still thank you for your help and Ideas.

How to solve error "Object library not registered" in VBA 2013?

I have developed a macro in VBA Excel 2016, which extracts information from emails in Outlook (sender, subject, date, etc), and exports this information in an Excel sheet.
The code works fine in Excel 2016, however, in Office 2013 versions I get the following error:
Automation error. Object library not registered
I would greatly appreciate if someone could help me solve this error.
This error appears in the following line of the code:
Set olNs = olApp.GetNamespace ("MAPI")
Actually, I already solved the issue. It was so simply as, when defining the correct libraries for 2013 office, saving the file, closing it, and then opening it again and then running the macro.
But anyway, thanks guys!

Excel Crashing Completely on Using Intersect

I am using the 64-bit version of Excel and have an Excel Macro workbook I have created and been using successfully for the last year. Today my workbook started crashing when doing a weekly daily upload that has not previously been an issue (no debug, just crashes and exits completely). I have gone through line-by-line and have found that crash occurs after using the Intersect() method.
This was not a problem when I used the same workbook last week.
I have rewritten a number of these Intersect() instances to use a different functionality to refer back to the same range which has solved the problem I am experiencing today, but I am trying to figure out why the Intersect() method is causing a crash in the first place so I can better design future macros.

Can't refresh webquery in Excel 2016

Since a few weeks I am using Office 2016 and I have a few Excel spreadsheets that collect data from my own webservice using a web query. As you can see, the webservice has the right properties in the connections dialog:
When I refresh, I always get the following error message:
It's in Dutch, but the error message says "Can't find Data Source". As you can see, the url of the webservice is not fully displayed. I can't find anything about it on Google, but did the length of a valid web query url change in the new version of Excel?
It works perfectly fine in Excel 2013 and Excel 2010.
After applying the Office Click-To-Run update (1609) to Excel 2016, I experience the same issue. It works in previous Excel versions, including 2013 and 2010. It seems a part of the URL in the GET request Excel makes is cut off.
By rolling back Office Click-To-Run update (1609), the problem disappears.
I have ended up working around this by shortening my URL's. This is probably only a solution to others if they can use an URL-shortening service (TinyUrl) or have control of the webservice.
It really seems like an Excel bug.

Resources