And it appears you're using the CHAR calculation instead of the CHR I had found.
CHAR in an Excel worksheet formula, Chr in VBA. For example, =CHAR(65) = "A" (no quotes) in Excel. ?chr(65) = "A" (no quotes) in VBA Immediate Window.
You use an underscore (_) as a continuation character. This allows you to split long lines of code across several lines to make it more readable. But you may then need ampersand (&) to concatenate the string segments.
So, if you had:
you could split that as
on the same line. And then, you could say:
It helps to be able to see how the various parts of the code or formulae line up.
The other options were just variations on a theme. If cell A1 is selected, using ActiveCell is the same as saying Range("A1"). The difference is that, with ActiveCell, you have no idea which cell is selected ... unless it is selected somewhere nearby.
It's better to control which cells you are accessing specifically rather than relying on the ActiveCell being where you think it should be. And, if you don't select cells, the ActiveCell won't change.
Bookmarks