I have written a macro but I need for the macro to ignore 3 open workbook. I have the code to ignore two open workbooks but when I add the 3rd workbook the macro gives an error. Here's the code I am using to ignore the two open workbooks:
If wb.Name <> "MacroNew.xlsm" And wb.Name <> ActiveWorkbook.Name Then x = wb.Name
Like I said this, code works if I have the MacroNew.xlsm workbook and an active workbook open. But I need the code to work when I have those two workbooks open and a 3rd workbook (let's call it Book3.xlsx) open.
Thanks if anybody can help.
Bookmarks