Cell Selection issue
I'm not 100% sure what you are wanting but I think you want to merge the cell
to the right of the activecell with the cell one row above that cell, right?
If so, you can use this line of code.
Union(ActiveCell.Offset(0, 1), ActiveCell.Offset(-1, 1)).MergeCells = True
Hope this helps! If so, let me know, click "YES" below.
--
Cheers,
Ryan
"Steve" wrote:
Morning all.
I'm making a user form, and want to select a cell to place my equation, then
with that selection choice, offset upwards, and to the side, to select and
merge two sets of two cells, each.
I understand with my selection that I'd use the following:
activecell.offset(0,1).select
to get my first cell selection.
But how do I retain that initial selection, and then offset one more up, to
then merge those two cells?
Thank you.
|