When I click the 'Help' button in these dialogs, the next dialog that appears is different on the 2 operating systems, as shown below. I'm only showing this one subroutine, but there are many others, including some that manipulate Word documents. Sub changeSheetsZoomLevel()įor Each sh In ThisWorkbook.Worksheets ' **<- error occurs here**
Now, I get this same Excel dialog: 'ActiveX component can't create object' whenever I try to run this simple sub, both on Windows 10 and Mac OSX. This code was working fine 2 days ago in both Windows 10 and Mac OSX, and then I had another (non-VBA) problem and the Microsoft Tech support representative reinstalled Office 365 to try to fix it. I've looked around StackOverflow and elsewhere and can't find any help that works. When I run the code below, I get the error in my title at the line indicated.