Try this:
With Application
.CommandBars("Sheet").Controls(2).Copy .CommandBars(1), 4
.CommandBars(1).Controls(4).Caption = "shtHid"
End With
Is that what you meant?
Ken Puls, CMA - Microsoft MVP (Excel)
www.excelguru.ca
x taol wrote:
With Application
.CommandBars("Sheet").Controls(2).Copy .CommandBars(1), 4
End With
this code work well.
but i want to change the name with "shtHid" using VBA.
*** Sent via Developersdex http://www.developersdex.com ***