Do you have hidden worksheets? Do you have merged cells? I am just guessing here.
How about you open a fresh workbook and run my coding. It runs well on a test workbook. Now all you have to decide is what is different from your workbook to the test one. If you can not figure out the difference post your workbook.