Insert VBA code user a macro
Hi, I was wondering if it is possible to add the VBA code below in one of the Microsoft Excel Objects called "Sheet2 (Begroting Calc Won)" in the VB editor by using a macro. How should the VBA code look like? Thanks in advance! Code: -------------------- Private Sub Worksheet_Activate() Dim oCB As CommandBar Set oCB = CommandBars("Verticaal Transport") oCB.Controls("Projectgegevens Aanpassen").Enabled = True oCB.Controls("Gegevens Aanpassen").Enabled = True oCB.Controls("Rij Invoegen").Enabled = True oCB.Controls("Rij Verwijderen").Enabled = True End Sub -------------------- -- leonidas ------------------------------------------------------------------------ leonidas's Profile: http://www.excelforum.com/member.php...o&userid=35375 View this thread: http://www.excelforum.com/showthread...hreadid=559233 |
Insert VBA code user a macro
See http://www.cpearson.com/excel/vbe.htm
-- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "leonidas" wrote in message ... Hi, I was wondering if it is possible to add the VBA code below in one of the Microsoft Excel Objects called "Sheet2 (Begroting Calc Won)" in the VB editor by using a macro. How should the VBA code look like? Thanks in advance! Code: -------------------- Private Sub Worksheet_Activate() Dim oCB As CommandBar Set oCB = CommandBars("Verticaal Transport") oCB.Controls("Projectgegevens Aanpassen").Enabled = True oCB.Controls("Gegevens Aanpassen").Enabled = True oCB.Controls("Rij Invoegen").Enabled = True oCB.Controls("Rij Verwijderen").Enabled = True End Sub -------------------- -- leonidas ------------------------------------------------------------------------ leonidas's Profile: http://www.excelforum.com/member.php...o&userid=35375 View this thread: http://www.excelforum.com/showthread...hreadid=559233 |
All times are GMT +1. The time now is 12:49 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com