
I also explain how to prevent the buttons from moving and resizing when changes are made to the sheet. In the video I explain my favorite method, and the pros & cons of each. There are 3 ways to add macro buttons to a worksheet in Excel: These are buttons that run macros when the button is pressed. In this video I explain the 3 ways to create macro buttons in Excel worksheets. Protecting and Formatting Sheets with the Macro Recorder 51:35Īny illegal reproduction of this content will result in immediate legal action.

Object Oriented Programming Languages 5:59 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.For ad free training and certificates please join Learnit Anytime:Įnroll in our live, instructor-led Excel VBA class:įor Private Group Trainings please visit: 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.
