The problem has to be either this line: Application.SendKeys "^(b)", True
or this line: Application.SendKeys "^(a)", True
I'm not really sure why they are even in the macro from what I can see in your code. Usually that command is used to force a command into a different program than Excel (say a DOS macro).
Try putting an apostrophe (single quote: ' ) in front of the lines to make them into comments for testing purposes.
|