Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default 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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Formula, Macro, or VBA code to find and insert Keith Excel Worksheet Functions 3 October 2nd 09 08:21 PM
Macro code to test for blank row and insert blank row if false Mattie Excel Programming 2 March 29th 06 01:19 AM
user input into active excel macro- prompt - respond -insert-cont Richard Duke Excel Programming 1 February 18th 06 02:44 PM
Insert VBA code with a macro in a .xls file by workbook open event mihai[_3_] Excel Programming 8 July 29th 04 01:49 PM
insert data into macro code from text input field? john_t_h[_15_] Excel Programming 1 January 16th 04 03:14 AM


All times are GMT +1. The time now is 11:40 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"