Forum Discussion
waygar
Nov 10, 2022Brass Contributor
To run a macro on another excel sheet with a different number of rows
Hi, I recorded a macro but when I try to use it on another spreadsheet with a different number of rows I get Error 9. Help I am new to this.
HansVogelaar
Jan 11, 2023MVP
I cannot explain that.
P.S. This discussion has become very long and awkward to navigate.
If you have a new question unrelated to the current discussion, would you be so kind to start a new discussion? Thanks in advance.
waygar
Jan 11, 2023Brass Contributor
Ok I now know what the cause is - assigning a shortcut key to the macro.
Even with your code, assigning a shortcut key such as CTRL SHFT U makes the code only work if run twice. I don't know why!
Even with your code, assigning a shortcut key such as CTRL SHFT U makes the code only work if run twice. I don't know why!