Commandbutton to copy based on CheckBox True/False

TDNova

New Member
Joined
Apr 16, 2018
Messages
45
Hello, im trying to figure out how to make this work.

I got a table with informaton. with a checkbox on the side of the table.
simply explained:
When the checkbox on the row is true, copy table row "b3:p3" to a new table.
but i want it to be activated by a commandbutton, so i can choose 5 checkboxes before it starts to copy.

Is there a way for it to work without linking each and every checkbox to the cells?

I do not have enough knowlegde in excel to know which approach is best suited here.
 
Okey, my bad for explaining poorly.

The second script worked perfectly. That subject is closed.
Since it copys the correct information to table 2 "orderoversikt" the only thing i want to know is how to change which column to activate the script.
Should i just change ListColumns(2).Range.Column = ListColumns(1).Range.Column

Yeah, i want it to remove the row from orderoversikt with doublecliking.
So basically remove a row from the list by doubleclicking if you regret adding it.

I do not want to delete it from the first table,
only be able to remove it from list 2 "orderoversikt" with doublecliking
 
Last edited:
Upvote 0

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
I have no such line of code in my script
You showed:
Should i just change ListColumns(2).Range.Column = ListColumns(1).Range.Column
I think you need to change this line of code:
Code:
cc = ActiveSheet.ListObjects("Lageroversikt").ListColumns(1).Range.Column
 
Upvote 0
Ohh okey, so there is no way of removing it ?
I just need a way to remove a row from the table"orderoversikt"
So you are able to remove what you added.

Yeah, that worked perfectly.
 
Last edited:
Upvote 0
Now since you originally said copy range b to p

We may need tp modify the script check and see if its copying all the columns you want.

I assume now you want A to O
 
Upvote 0
yeah, first table is c to r
the table "orderoversikt" is on T to AI

because both are on the same sheet. because the main plan is to be able to add rows from first table to second table.
and i tought it would be good to have a chance to remove the row you added since people often do mistakes.
 
Upvote 0
So I do not want to move on till you tell me for sure all is now working properly with the script we are now using.

Are you now able to double click on Column A and get what you want.

You earlier said yes but then said you wanted to change column B to A

I never like getting started on a second project till first project is complete.
 
Upvote 0
Sure, that is very understandable and smart !
yes, when i press column A it copys the information to the correct spots. expect the last row there i got names. It does not copy the name. i tried to change:
Cells(r, c).Resize(, 15).Copy ActiveSheet.ListObjects("Orderoversikt").Range.Cells(Lastrow, 1) to Cells(r, c).Resize(, 20).Copy ActiveSheet.ListObjects("Orderoversikt").Range.Cells(Lastrow, 1)
then it filled in the last column aswell but not with correct information, not all the rows got names filled inn but instead N/A.
But when i copyed a row with name it still showed N/A

Also see now that on column I the information get copied incorrectly,it get placed in correct column on orderoversikt but it pulls wrong information from the same column, but i have a feeling that occurs becuase it's stacking up without being cleared.
 
Last edited:
Upvote 0
Just to make sure first table "Lageroversikt" is on A to P
Orderoversikt is from R to AG, because i deleted to colums.

do i need to change the "c" in the code to "A" ? "c = Target.Column"
 
Upvote 0
Well Maybe someone can help you with this I think I have run out of ideals.
You earlier said all was working well but now I guess your having all sorts of issues.
Sorry I was not able to help you.
 
Upvote 0
You earlier said all was working well but now I guess your having all sorts of issues.
Sorry I was not able to help you.

It worked with copying, but it pull wrong information on one of the columns, im not sure why.
and the last column could be because of the N/A instead of having it empty.

yeah, it was my bad. didn't see it.
No need to say sorry! you helped me alot and spent alot of time. that is more than enough. you gave me new ways of thinking and i appreciate that!
If you find a way later just give me a message, i guess i try building on the code and fix it.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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