View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Peter T Peter T is offline
external usenet poster
 
Posts: 5,600
Default 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