However, I went ahead and tried it, and it ran until it got to the line that is commented out where I Set nWB = with runtime error 438: object does not support this property or method. Obviously Word is not the same as Excel, and hoping that they had similar syntax is a farfetched dream. In the Else block, the only related post I could find to creating a file that doesn't exist is this: Create Word file from Excel 2011 Set nExcel = CreateObject("excel.application") 'create Set nExcel = GetObject(, "excel.application") 'gives error 429 if Excel is not open 'Note: I understand that this check should be redundant If FileOrFolderExistsOnMac(1, strFile) Then If I try to simply open a file that doesn't exist, then it errors out. However, in the event that it fails to find a file, I can't determine a way to create one. I have successfully created the ability to open an existing file using existing questions and answers online. On a rare occasion, if a file does not exist, it wants to create a new excel file, edit it, and then close the file (saving changes). Part of the macro wants to open a file (99% of the time), edit the file, and then close the file (saving changes). I'm creating a macro in Excel 2011 for Mac to create reports. However, IT has forced me to 'upgrade' to Excel 2016, and now the following line fails: set (Type:msoControlPopup,Temporary:true) This is because Controls.Add now returns a CommandBarControl object instead of a CommandBarPopup object.
0 Comments
Leave a Reply. |