Command buttons not sorting - and sometimes jumping around on sort

netxtown

New Member
Joined
Oct 6, 2023
Messages
12
Office Version
  1. 2007
Platform
  1. Windows
Using a sort macro on column(s) containing command buttons is resulting in stacked buttons and weird sorts.

25 rows
3 columns
each row is an account
1st column is hard coded worksheet name (not same as account name (i.e. Acct01 is worksheet name; account is "Branscome"))
2nd column is account name provided via hlookup
3rd column is service day (1, 5, 10, etc and includes "no svc" for dead accounts

I have inserted command buttons for each row. The button covers columns 1 & 2 and leaves the 3rd column visible.
The command button is "named", for example, by entering =$D$12 in the formula line when the button is initially selected.
Subsequently, a macro is then assigned to the command button that goes directly to that account's worksheet.

At the top of the account columns (col 1& 2) is a command button to sort by name
At the top of the service day info column is a command button to sort by day.

Without the command buttons on each row all works perfectly. But! When i create and place the command buttons, usually the account sort works ok. But when I do the service day sort, the command buttons are out of order - and with several being placed behind other command buttons.

FWIW - this exact same spreadsheet was created way back when with Excel 2003 - and everything has always worked just fine. That same spreadsheet in Excel 2023 still works just fine. And i am about to go blind trying to figure out what the heck is happening. I have deleted (cut) all of the command buttons on the rows, deleted the sort macros for the two sort buttons at the top of the columns - recreated all of it - and still I got command buttons playing hide n seek and out of order.

I am at a loss, and I need to get this working again. Any ideas?
 
Only once I did the merge/unmerge bit did it all work.
As it stands now, each command button spans the two columns (merged and then unmerged).
 
Upvote 0

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.

Forum statistics

Threads
1,224,813
Messages
6,181,111
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top