Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 29
Default Toolbar position

I have a custom toolbar created when a worksheet is opened, however I want to
place it next to another toolbar everytime it is opened. I have used the
following code:

MyBar.RowIndex = Application.CommandBars("OtherBar").RowIndex
MyBar.Left = Application.CommandBars("OtherBar").Left

This would work except that at my work we have another toolbar that is
created anytime excel is opened and that is the toolbar I want it next to and
the code for my bar is running first so I get an error.

How do I make it so my toolbar isn't created until the other toolbar has
been created?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,718
Default Toolbar position

Perhaps you could delay your commandbar creating sub. Instead of calling it
directly in your Auto_Open or Workbook_Open sub:

AddMyCmdbar

you could call it like this:

Application.OnTime DateAdd("s", 3, Now), "AddMyCmdbar"

--
Jim
"Spencer" wrote in message
...
|I have a custom toolbar created when a worksheet is opened, however I want
to
| place it next to another toolbar everytime it is opened. I have used the
| following code:
|
| MyBar.RowIndex = Application.CommandBars("OtherBar").RowIndex
| MyBar.Left = Application.CommandBars("OtherBar").Left
|
| This would work except that at my work we have another toolbar that is
| created anytime excel is opened and that is the toolbar I want it next to
and
| the code for my bar is running first so I get an error.
|
| How do I make it so my toolbar isn't created until the other toolbar has
| been created?

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
Custom toolbar, setting docked position ker_01 Excel Programming 0 July 24th 08 07:14 PM
Initial position of floating toolbar Otto Moehrbach Excel Programming 1 November 11th 07 02:56 PM
Custom Toolbar Position Zone Excel Programming 0 May 31st 06 06:16 PM
Custom Toolbar position Michelle Excel Programming 3 September 1st 04 08:25 PM
toolbar position M. Excel Programming 1 September 19th 03 11:36 AM


All times are GMT +1. The time now is 11:27 AM.

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"