Disable command button to be copied

ShieBoon

Board Regular
Joined
May 3, 2011
Messages
111
Hi all, i have a range in a worksheet which i want to copy to another worksheet when i click on a command button, in the same worksheet. Unfortunately, the command button lies within the range. Thus whenever i click the button, the button gets copied over too. How can i prevent the button from being copied over in vba?

I've tried recording macro while copying over with paste special, xlFormats, xlValues.

If i do it manually in excel, the button doesn't gets copied over. However using the same codes recorded by the macro recorder, the button still gets copied over. Any ideas?

Thanks
excel 2003
Shie Boon
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
Hello,

One solution may be to right click the command button and select Format Control. Under the Properties tab check "Don't move or size with cells".

Does that Help?

Jeff
 
Upvote 0
1. Right-click on button
2. Format Control...
3. Properties
4. Don't move or size with cells
 
Upvote 0
yes it does! thank you guys! How did you guys know about this? I didn't manage to find it tru google :/
 
Upvote 0

Forum statistics

Threads
1,216,136
Messages
6,129,084
Members
449,485
Latest member
greggy

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