Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
General
GeneralPortable MacsHardwareNetworking
Applications
Mac ApplicationsEudoraFirefox / MozillaInternet ExplorerOutlook ExpressMS OfficeEntourageExcelPowerPointWordVirtual PCMedia PlayerOther MS Products
Programming
Mac ProgrammingCodeWarriorPerl
Country Specific
Australian Mac GroupUK Mac Group

Mac Forum / Applications / Excel / January 2006



Tip: Looking for answers? Try searching our database.

VBA Toolbars

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Francis Hookham - 29 Jan 2006 10:17 GMT
Recently Bernard Ray helped with the code below where all three VBA toolbars
are on view when the VBA editor is opened

Can that code be extended so the Properties window does not open?

Even better, can the Projects window be moved to a position to the right of
the screen? Of course I realise I should have to experiment with x-y dims

Francis Hookham
__________________________________________________________

> Francis Hookham a écrit :
>
>> On opening only Standard toolbar is in view ­ I have not found how to
>> default to all toolbars on view
>>
>> Better still, how about a custom toolbar with only the buttons I normally
>> need, as in XL 2000 - or didn¹t Bill think Mac users needed it as much as PC
>> users?
>
> There is a workaround, borrowed from JE McGimpsey that does fit the bars
> where I like to have them. You can copy the following lines in a macro
> module of your "Personal Macros Workbook"
>
> ----------------------------------------------------
> Public Sub SetUpVBEToolbars()
>         Const LEFTPOS = 752   ' these are my settings
>         Const TOPPOS = 21     ' adapt them to your needs
>         Const ROWNDX = 2
>        
>        With Application.VBE
>             'With .CommandBars("Edit") ' Edition
>             '     .Visible = True
>             'End With
>             With .CommandBars("Debug") ' Débogage
>                 .Position = msoBarTop
>                 .RowIndex = ROWNDX
>                 .Left = LEFTPOS
>                 .Top = TOPPOS
>                 .Visible = True
>                 .Protection = msoBarNoMove
>             End With
>             .Windows("Properties").Visible = True
>         End With
> End Sub
> ----------------------------------------------------
>
> In order to have it automatically launched on statup, put these lines in the
> ThisWorkbook code sheet of the "Personal Macros Workbook":
>
> ----------------------------------------------------
> Private Sub Workbook_Open()
>     SetUpVBEToolbars
> End Sub
> ----------------------------------------------------
>
> That way, when your personal macros Workbook is automatically opened on
> Excel startup, the bars will be placed where you'd like to have them.
> Unfortunaltely, there's no way (that I know) to customize these bars.
>
> The Mac VB Editor is certainly much "simpler" than its Windows equivalent...
> The Mac User is usually supposed not to use VBA that much and/or to be a
> rather good AppleScripter if he wants to automate things :-/
>
> ---------------------------------------------------------
> Please reply to the newsgroup, and within the same thread.
> Merci de répondre au groupe, et dans l'enfilade.
JE McGimpsey - 29 Jan 2006 13:32 GMT
> Recently Bernard Ray helped with the code below where all three VBA toolbars
> are on view when the VBA editor is opened
>
> Can that code be extended so the Properties window does not open?

Change

   .Windows("Properties").Visible = True

to

   .Windows("Properties").Close

which is equivalent to

   .Windows("Properties").Visible = False

> Even better, can the Projects window be moved to a position to the right of
> the screen? Of course I realise I should have to experiment with x-y dims

IIRC,  the .Top and .Left properties of the Projects and Properties
windows cannot be set programmatically.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.