Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35
Default Docking a Toolbar and having it stay

I've created a wonderful custom toolbar and ADd-in using the instructions at
this web site in XL 2003: http://www.contextures.com/xlToolbar02.html

However, the custom toolbar always free floats, even if I drag it up and
dock it, save the XLA, save the code window, save my soul.

Any way to get it to stay put so when I open xl again, it's up at the top
with the other toolbars?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Docking a Toolbar and having it stay

With Application.CommandBars.Add
.Name = ToolBarName
.Left = 200
.Top = 200
.Protection = msoBarNoProtection
.Visible = True
.Position = msoBarFloating


You can change this portion:
.Position = msoBarFloating
to
.Position = msoBarTop
or
.Position = msoBarBottom



Access101 wrote:

I've created a wonderful custom toolbar and ADd-in using the instructions at
this web site in XL 2003: http://www.contextures.com/xlToolbar02.html

However, the custom toolbar always free floats, even if I drag it up and
dock it, save the XLA, save the code window, save my soul.

Any way to get it to stay put so when I open xl again, it's up at the top
with the other toolbars?


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35
Default Docking a Toolbar and having it stay

Dave, all of this works great. However, is there a way to dock it to the
right of another toolbar, which itself only takes up half the line, and this
way, it would take up the other half of the row?

If I dock it at Top, the rows are Menus, Standard, Formatting, MyToolbar

If I use Left/Top coordinates and free floating, I can get it to the right
of Standard.

And if I manually move the toolbar and close XL, it's back to its fourth row
position again when I open up XL.

Any help is appreciated.

"Dave Peterson" wrote:

With Application.CommandBars.Add
.Name = ToolBarName
.Left = 200
.Top = 200
.Protection = msoBarNoProtection
.Visible = True
.Position = msoBarFloating


You can change this portion:
.Position = msoBarFloating
to
.Position = msoBarTop
or
.Position = msoBarBottom



Access101 wrote:

I've created a wonderful custom toolbar and ADd-in using the instructions at
this web site in XL 2003: http://www.contextures.com/xlToolbar02.html

However, the custom toolbar always free floats, even if I drag it up and
dock it, save the XLA, save the code window, save my soul.

Any way to get it to stay put so when I open xl again, it's up at the top
with the other toolbars?


--

Dave Peterson

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Docking a Toolbar and having it stay

myToolbar is the row where the new toolbar should be docked?

Dim OtherCmdBar as application.commandbar
set othercmdbar = application.commandbars("mytoolbar")
with application.commandbars.add
.name = toolbarname
.rowindex = othercmdbar.rowindex
.position = msoBarTop
'you could even move it over a bit if you wanted a gap:
.left = othercmdbar.left + othercmdbar.width + 12 'or whatever you want.
End with

Untested. Uncompiled. Watch for typos!



Access101 wrote:

Dave, all of this works great. However, is there a way to dock it to the
right of another toolbar, which itself only takes up half the line, and this
way, it would take up the other half of the row?

If I dock it at Top, the rows are Menus, Standard, Formatting, MyToolbar

If I use Left/Top coordinates and free floating, I can get it to the right
of Standard.

And if I manually move the toolbar and close XL, it's back to its fourth row
position again when I open up XL.

Any help is appreciated.

"Dave Peterson" wrote:

With Application.CommandBars.Add
.Name = ToolBarName
.Left = 200
.Top = 200
.Protection = msoBarNoProtection
.Visible = True
.Position = msoBarFloating


You can change this portion:
.Position = msoBarFloating
to
.Position = msoBarTop
or
.Position = msoBarBottom



Access101 wrote:

I've created a wonderful custom toolbar and ADd-in using the instructions at
this web site in XL 2003: http://www.contextures.com/xlToolbar02.html

However, the custom toolbar always free floats, even if I drag it up and
dock it, save the XLA, save the code window, save my soul.

Any way to get it to stay put so when I open xl again, it's up at the top
with the other toolbars?


--

Dave Peterson


--

Dave Peterson
  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Docking a Toolbar and having it stay

But do use:

Dim OtherCmdBar As CommandBar



Dave Peterson wrote:

myToolbar is the row where the new toolbar should be docked?

Dim OtherCmdBar as application.commandbar
set othercmdbar = application.commandbars("mytoolbar")
with application.commandbars.add
.name = toolbarname
.rowindex = othercmdbar.rowindex
.position = msoBarTop
'you could even move it over a bit if you wanted a gap:
.left = othercmdbar.left + othercmdbar.width + 12 'or whatever you want.
End with

Untested. Uncompiled. Watch for typos!

Access101 wrote:

Dave, all of this works great. However, is there a way to dock it to the
right of another toolbar, which itself only takes up half the line, and this
way, it would take up the other half of the row?

If I dock it at Top, the rows are Menus, Standard, Formatting, MyToolbar

If I use Left/Top coordinates and free floating, I can get it to the right
of Standard.

And if I manually move the toolbar and close XL, it's back to its fourth row
position again when I open up XL.

Any help is appreciated.

"Dave Peterson" wrote:

With Application.CommandBars.Add
.Name = ToolBarName
.Left = 200
.Top = 200
.Protection = msoBarNoProtection
.Visible = True
.Position = msoBarFloating


You can change this portion:
.Position = msoBarFloating
to
.Position = msoBarTop
or
.Position = msoBarBottom



Access101 wrote:

I've created a wonderful custom toolbar and ADd-in using the instructions at
this web site in XL 2003: http://www.contextures.com/xlToolbar02.html

However, the custom toolbar always free floats, even if I drag it up and
dock it, save the XLA, save the code window, save my soul.

Any way to get it to stay put so when I open xl again, it's up at the top
with the other toolbars?

--

Dave Peterson


--

Dave Peterson


--

Dave Peterson


  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35
Default Docking a Toolbar and having it stay

Dave,

Thanks for your ideas. I'm debugging as I go. Since I'm getting errors on
the Dim and the Set commands, I thought I would just try Row =2 and Left =
800.

Although this puts my toolbar on row 2 and over 800 pixels, it still is on a
separate line than other toolbars. Should this be working, or do I need to
get the Dim and Set commands to work in order to a ccomplish this?

Thanks for your time and effort, and suggestions.

"Dave Peterson" wrote:

But do use:

Dim OtherCmdBar As CommandBar



Dave Peterson wrote:

myToolbar is the row where the new toolbar should be docked?

Dim OtherCmdBar as application.commandbar
set othercmdbar = application.commandbars("mytoolbar")
with application.commandbars.add
.name = toolbarname
.rowindex = othercmdbar.rowindex
.position = msoBarTop
'you could even move it over a bit if you wanted a gap:
.left = othercmdbar.left + othercmdbar.width + 12 'or whatever you want.
End with

Untested. Uncompiled. Watch for typos!

Access101 wrote:

Dave, all of this works great. However, is there a way to dock it to the
right of another toolbar, which itself only takes up half the line, and this
way, it would take up the other half of the row?

If I dock it at Top, the rows are Menus, Standard, Formatting, MyToolbar

If I use Left/Top coordinates and free floating, I can get it to the right
of Standard.

And if I manually move the toolbar and close XL, it's back to its fourth row
position again when I open up XL.

Any help is appreciated.

"Dave Peterson" wrote:

With Application.CommandBars.Add
.Name = ToolBarName
.Left = 200
.Top = 200
.Protection = msoBarNoProtection
.Visible = True
.Position = msoBarFloating


You can change this portion:
.Position = msoBarFloating
to
.Position = msoBarTop
or
.Position = msoBarBottom



Access101 wrote:

I've created a wonderful custom toolbar and ADd-in using the instructions at
this web site in XL 2003: http://www.contextures.com/xlToolbar02.html

However, the custom toolbar always free floats, even if I drag it up and
dock it, save the XLA, save the code window, save my soul.

Any way to get it to stay put so when I open xl again, it's up at the top
with the other toolbars?

--

Dave Peterson


--

Dave Peterson


--

Dave Peterson

  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35
Default Docking a Toolbar and having it stay

Dave, Oh wait, I figured it out. I did the following:

Set OtherCmdBar = Application.CommandBars("Standard")

Great advice, thanks so much for your time. This has been very useful.

"Dave Peterson" wrote:

But do use:

Dim OtherCmdBar As CommandBar



Dave Peterson wrote:

myToolbar is the row where the new toolbar should be docked?

Dim OtherCmdBar as application.commandbar
set othercmdbar = application.commandbars("mytoolbar")
with application.commandbars.add
.name = toolbarname
.rowindex = othercmdbar.rowindex
.position = msoBarTop
'you could even move it over a bit if you wanted a gap:
.left = othercmdbar.left + othercmdbar.width + 12 'or whatever you want.
End with

Untested. Uncompiled. Watch for typos!

Access101 wrote:

Dave, all of this works great. However, is there a way to dock it to the
right of another toolbar, which itself only takes up half the line, and this
way, it would take up the other half of the row?

If I dock it at Top, the rows are Menus, Standard, Formatting, MyToolbar

If I use Left/Top coordinates and free floating, I can get it to the right
of Standard.

And if I manually move the toolbar and close XL, it's back to its fourth row
position again when I open up XL.

Any help is appreciated.

"Dave Peterson" wrote:

With Application.CommandBars.Add
.Name = ToolBarName
.Left = 200
.Top = 200
.Protection = msoBarNoProtection
.Visible = True
.Position = msoBarFloating


You can change this portion:
.Position = msoBarFloating
to
.Position = msoBarTop
or
.Position = msoBarBottom



Access101 wrote:

I've created a wonderful custom toolbar and ADd-in using the instructions at
this web site in XL 2003: http://www.contextures.com/xlToolbar02.html

However, the custom toolbar always free floats, even if I drag it up and
dock it, save the XLA, save the code window, save my soul.

Any way to get it to stay put so when I open xl again, it's up at the top
with the other toolbars?

--

Dave Peterson


--

Dave Peterson


--

Dave Peterson

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
Toolbar - Button Won't Stay Karin Excel Discussion (Misc queries) 3 June 10th 08 07:19 PM
Docking Project Explorer, Properties window and Code window in VBE jayray Setting up and Configuration of Excel 2 March 27th 07 04:42 PM
Toolbar Re-Docking Robert11 New Users to Excel 1 February 2nd 07 03:28 PM
floating toolbar to stay put BorisS Excel Discussion (Misc queries) 2 December 3rd 06 08:47 PM
Ex 2K Standard Toolbar won't stay hidden Dane Excel Discussion (Misc queries) 0 October 6th 05 11:47 PM


All times are GMT +1. The time now is 09:35 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"