ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   To change command button caption (https://www.excelbanter.com/excel-programming/418167-change-command-button-caption.html)

CAPTGNVR[_2_]

To change command button caption
 
Dear All
I am in sheet2.
I click a custom tool bar item, then it has to goto sheet1 and change
command button in sheet1 by name 'alfa" caption from "go to ballast" to "go
to cargo" .

Have been getting error when using activesheet.shapes.("alfa").caption= "go
to cargo"

Pls suggest right code n thnks

brgds/captgnvr

CAPTGNVR[_2_]

To change command button caption
 
Sorry- figured it out and the below code works.
ActiveSheet.OLEObjects("alfa").Object _
..Caption = "GO TO CARGO"

can consider this thread closed.

"CAPTGNVR" wrote:

Dear All
I am in sheet2.
I click a custom tool bar item, then it has to goto sheet1 and change
command button in sheet1 by name 'alfa" caption from "go to ballast" to "go
to cargo" .

Have been getting error when using activesheet.shapes.("alfa").caption= "go
to cargo"

Pls suggest right code n thnks

brgds/captgnvr



All times are GMT +1. The time now is 10:51 PM.

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