Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default How control where the CommandBar will be placed?

Hi,

I have a CommandBar with buttons that always is placed below the ordinary
menues/bars. If I relocate it to a better place, it always come back below
again. Can I control where it should be located? On second commandbar row to
the left?

Kind Regards


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,080
Default How control where the CommandBar will be placed?

By trial and error (don't know if it will work exactly the same on all
systems):

With CommandBars("MyCommandBar")
.Top = 50
.Left = 0
End With

--

Vasant


"Gunnar Johansson" wrote in message
...
Hi,

I have a CommandBar with buttons that always is placed below the ordinary
menues/bars. If I relocate it to a better place, it always come back below
again. Can I control where it should be located? On second commandbar row

to
the left?

Kind Regards




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,290
Default How control where the CommandBar will be placed?

Gunnar,

This places a new command bar to the left of the Formatting toolbar.
If you want the next row up, change "Formatting" to "Standard".
'----------------------------
Dim MyCommandBar As Office.CommandBar
Set MyCommandBar = CommandBars.Add(Name:="MyBar", _
Position:=msoBarTop, Temporary:=True)
'Add some buttons here
MyCommandBar.RowIndex = _
Application.CommandBars("Formatting").RowIndex
MyCommandBar.Visible = True
Set MyCommandBar = Nothing
'--------------------------

Jim Cone
San Francisco, USA


"Gunnar Johansson" wrote in message ...
Hi,
I have a CommandBar with buttons that always is placed below the ordinary
menues/bars. If I relocate it to a better place, it always come back below
again. Can I control where it should be located? On second commandbar row to
the left?
Kind Regards


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default How control where the CommandBar will be placed?

Hi,

Still I want the commandbar to be located together with the ordinary ones. I
wasn't clear on this. I guess your code will make it a floationg bar, right
or wrong?

Kind Regards


"Vasant Nanavati" <vasantn *AT* aol *DOT* com skrev i meddelandet
...
By trial and error (don't know if it will work exactly the same on all
systems):

With CommandBars("MyCommandBar")
.Top = 50
.Left = 0
End With

--

Vasant


"Gunnar Johansson" wrote in message
...
Hi,

I have a CommandBar with buttons that always is placed below the ordinary
menues/bars. If I relocate it to a better place, it always come back
below
again. Can I control where it should be located? On second commandbar row

to
the left?

Kind Regards






  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,080
Default How control where the CommandBar will be placed?

Yes. Jim's suggestion is a lot better.

--

Vasant

"Gunnar Johansson" wrote in message
...
Hi,

Still I want the commandbar to be located together with the ordinary ones.

I
wasn't clear on this. I guess your code will make it a floationg bar,

right
or wrong?

Kind Regards


"Vasant Nanavati" <vasantn *AT* aol *DOT* com skrev i meddelandet
...
By trial and error (don't know if it will work exactly the same on all
systems):

With CommandBars("MyCommandBar")
.Top = 50
.Left = 0
End With

--

Vasant


"Gunnar Johansson" wrote in message
...
Hi,

I have a CommandBar with buttons that always is placed below the

ordinary
menues/bars. If I relocate it to a better place, it always come back
below
again. Can I control where it should be located? On second commandbar

row
to
the left?

Kind Regards








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
Closing form turns off commandbar control procedures?? Caro-Kann Defence Excel Programming 0 January 28th 05 09:35 PM
create commandbar / control button using codes tango Excel Programming 0 October 26th 04 01:38 AM
commandbar control and application.caller Doug Glancy Excel Programming 3 March 1st 04 09:47 AM
Changing the height of a commandbar control (edit box) at runtime simon livings Excel Programming 1 December 13th 03 01:28 AM
Add control to commandbar Dan[_20_] Excel Programming 2 August 27th 03 04:47 PM


All times are GMT +1. The time now is 10:45 PM.

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"