ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Programmatically copying range in design mode (https://www.excelbanter.com/excel-programming/417215-programmatically-copying-range-design-mode.html)

Robert Davidson

Programmatically copying range in design mode
 
Manually I can switch to design mode, copy a range full of form controls and
paste it to another area. If I do not switch to design mode, it does not copy
the controls.

I would like to do this programmatically. Is there any way to enter design
mode through VBA? Record macro doesn't help, and searching XL VBA help for
design mode doesn't show anything I recognize as promising.

Many thanks,

Robert Davidson

Jim Thomlinson

Programmatically copying range in design mode
 
Can't do... You need to get a link to the controls and make copies of them.
Are the controls from the forms toolbar or from the control toolbox. What
kind of controls are they...
--
HTH...

Jim Thomlinson


"Robert Davidson" wrote:

Manually I can switch to design mode, copy a range full of form controls and
paste it to another area. If I do not switch to design mode, it does not copy
the controls.

I would like to do this programmatically. Is there any way to enter design
mode through VBA? Record macro doesn't help, and searching XL VBA help for
design mode doesn't show anything I recognize as promising.

Many thanks,

Robert Davidson


Robert Davidson[_2_]

Programmatically copying range in design mode
 
I played around a little more and found that the activeX controls would copy
with the range without entering design mode, but also found that if the
LinkedCell were in the copied range, the new checkbox would maintain the
reference to the old address - so there would be two checkboxes pointing to
the same cell. I could get this to work if there were a way to identify which
cell the copied checkbox should point to.

I'm going to try an figure out a way to do it without controls.


All times are GMT +1. The time now is 04:13 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com