I am extremely new to VBA. I put together the below code to right align numbers and center align text in all sheets of a workbook. I defined the PerfArea.This code works in 3 different workbooks like a charm. In one of them I get the error message "Run-time error '1004' Method 'Range' of object'_Worksheet' failed. I don't think anything is different about this workbook. Any ideas? It looks like the problem line is the first ws.Range line. Thanks in advance.
Please Login or Register to view this content.
Bookmarks