I am trying to swap columns of data at the click of a command button.
I originally found this code to swap the columns.
However, when I try and swap a column that contains a command button I get an error. In my code is a sub Build_Menu. This is how I create my command buttons quickly. The function Create_Command_Button decides what the dimension of the button will be. Finally, the cmdButton4_Click was originally part of a command button in my real spreadsheet. Now it is just the code to swap two columns. When you select two columns at the top and run the sub it will swap the two areas. If you do the same thing in a column with a command button an error pops up.
What I would like is for someone to show/ help me make the code so a user can select the columns and then have the code automatically not swap cells in row 1 or 2.
Thank you in advance.
Bookmarks