ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Help needed moving a command button (https://www.excelbanter.com/excel-programming/351744-help-needed-moving-command-button.html)

Karoo News[_2_]

Help needed moving a command button
 
Hi I need a code that moves a command button named AdjLeft, I cannot use
increment as the position depends on the width of column a A.

EG: if column a is 22.86 wide the position of button AdjLeft needs to be say
15.25

I have tried various ways but nothing works!!!

Many thanks in advance
Neil




Vic Eldridge[_3_]

Help needed moving a command button
 
if column a is 22.86 wide the position of button AdjLeft needs to be say
15.25

Either of the following lines would make such an adjustment. You can decide
which one is most appropriate.

ActiveSheet.Shapes("AdjLeft").Left = ActiveSheet.Columns("A:A").Width - 7.61
ActiveSheet.Shapes("AdjLeft").Left = ActiveSheet.Columns("A:A").Width * 0.667


Regards,
Vic Eldridge


"Karoo News" wrote:

Hi I need a code that moves a command button named AdjLeft, I cannot use
increment as the position depends on the width of column a A.

EG: if column a is 22.86 wide the position of button AdjLeft needs to be say
15.25

I have tried various ways but nothing works!!!

Many thanks in advance
Neil






All times are GMT +1. The time now is 01:29 PM.

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