Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Toolbar - Button Won't Stay | Excel Discussion (Misc queries) | |||
Docking Project Explorer, Properties window and Code window in VBE | Setting up and Configuration of Excel | |||
Toolbar Re-Docking | New Users to Excel | |||
floating toolbar to stay put | Excel Discussion (Misc queries) | |||
Ex 2K Standard Toolbar won't stay hidden | Excel Discussion (Misc queries) |