Insert VBA code user a macro

L

leonidas

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top