I have about 200 rows of data, each with multiple form control (not the ActiveX control) buttons. I create the buttons named according to their row, and set the .placement property to "don't move or size with cells"
That part is working, and I can see that the buttons are named and placed properly. The problem arises when I sort the rows. The buttons move, regardless of the .placement setting. I'm using this code to sort:
I didn't include the full code - the variables correspond to column and row numbers. The sorting code is also working fine. My problem is just figuring out how to not have the buttons move when I sort.
Is there any way to accomplish that?
Code:
bBtn.Placement = xlFreeFloating
That part is working, and I can see that the buttons are named and placed properly. The problem arises when I sort the rows. The buttons move, regardless of the .placement setting. I'm using this code to sort:
Code:
set wb = ThisWorkbook
set ws = ThisWorksheet
set rFullRange = ws.Range(Cells(lFirstRow, 1), Cells(lLastRow, lLastCol))
rFullRange.Sort key1:=ws.Columns(lSortCol), order1:=xlAscending, key2:=ws.Columns(lJobNumCol), order2:=xlAscending, Header:=xlNo
I didn't include the full code - the variables correspond to column and row numbers. The sorting code is also working fine. My problem is just figuring out how to not have the buttons move when I sort.
Is there any way to accomplish that?