Macro button to move row up/down +1/-1 including combobox

Will85

Active Member
Joined
Apr 26, 2012
Messages
254
Office Version
  1. 365
Platform
  1. Windows
Desire: I am trying to create two macro buttons side by side at the beginning of each of my "active" rows, that will cut the row and either insert it above or insert it below the rows current location depending on which button is pressed (The first button would say Up or have an Up arrow, the second button would say Down or have a down arrow).

Problem: Each of my rows contain an activex combobox (with a linked cell) so simply highlighting a row and CTRL+X and then inserting in the desired location does not capture the combobox.

Details:
My worksheet is broken out into two sections, revenue and expense.

My revenue "active" rows would be from below row 9 and above the first row with the text "x" in column B

My expense "active" rows would be from below the second "x" in column B and above the third "x" in column B

Column B will only ever have three "X"s otherwise every other cell in column B is blank

The users insert additional Revenue and Expense rows at their discretion using other macros I have in the worksheet. Each new inserted row has an activex combobox that comes with it. Each new Revenue and Expense row are always inserted at the very bottom of the Revenue or Expense section, ie above the first "x" in column B for revenue or above the third "x" in column B for expense. Because everything is inserted at the bottom of each section, the user may want to re-organize the rows. Say for example Rows 10 thru 13 are Hamburger sales revenue, then row 14 is hotdog sales revenue, and then the user inserts another Hamburger sales revenue row . . . they would then hit the up arrow to cut and paste that hamburger sales revenue row above the hotdog sales revenue row; so it would go from ham, ham, ham, hot, ham, to ham, ham, ham, ham, hot
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes

Forum statistics

Threads
1,224,823
Messages
6,181,176
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