ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   VBE Toolbars and Windows (https://www.excelbanter.com/excel-programming/440524-vbe-toolbars-windows.html)

BillCPA

VBE Toolbars and Windows
 
I know you can reference the different VB windows with VB code - is there
some way to reference the toolbars in the VB Editor window?

Also, the whole, overall window that appears when you enter the VB Editor -
is this the '....VBE.MainWindow'?

--
Bill @ UAMS

Peter T

VBE Toolbars and Windows
 
"BillCPA" <Bill @ UAMS wrote in message

I know you can reference the different VB windows with VB code - is there
some way to reference the toolbars in the VB Editor window?


Dim objVBE As VBE
Dim cbr As CommandBar
Set objVBE = Excel.Application.VBE
Set bars = objVBE.CommandBars
For Each cbr In objVBE.CommandBars
Debug.Print cbr.Name
Next
Set cbr = objVBE.CommandBars("Menu Bar")
Debug.Print cbr.Name


Also, the whole, overall window that appears when you enter the VB
Editor -
is this the '....VBE.MainWindow'?


Yes
also look at
For Each W in objVBE.Windows

Regards,
Peter T



Chip Pearson

VBE Toolbars and Windows
 
Application.VBE.CommandBars is the root of all command and menu bars
in the VBA Editor. Yes, Application.VBE.MainWindow is the editor's
main application window.

Cordially,
Chip Pearson
Microsoft MVP 1998 - 2010
Pearson Software Consulting, LLC
www.cpearson.com
[email on web site]




On Thu, 11 Mar 2010 11:07:01 -0800, BillCPA <Bill @ UAMS wrote:

I know you can reference the different VB windows with VB code - is there
some way to reference the toolbars in the VB Editor window?

Also, the whole, overall window that appears when you enter the VB Editor -
is this the '....VBE.MainWindow'?



All times are GMT +1. The time now is 08:25 PM.

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