+ Reply to Thread
Results 1 to 5 of 5

How control where the CommandBar will be placed?

  1. #1
    Gunnar Johansson
    Guest

    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. #2
    Vasant Nanavati
    Guest

    Re: 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" <Gujo_454@hotmail.com> wrote in message
    news:OL7jHk$UFHA.1508@tk2msftngp13.phx.gbl...
    > 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. #3
    Jim Cone
    Guest

    Re: 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" <Gujo_454@hotmail.com> wrote in message news:OL7jHk$UFHA.1508@tk2msftngp13.phx.gbl...
    > 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. #4
    Gunnar Johansson
    Guest

    Re: 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
    news:ODboq5$UFHA.3544@TK2MSFTNGP12.phx.gbl...
    > 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" <Gujo_454@hotmail.com> wrote in message
    > news:OL7jHk$UFHA.1508@tk2msftngp13.phx.gbl...
    >> 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. #5
    Vasant Nanavati
    Guest

    Re: How control where the CommandBar will be placed?

    Yes. Jim's suggestion is a lot better.

    --

    Vasant

    "Gunnar Johansson" <GuJo_454@hotmail.com> wrote in message
    news:uGCmgFBVFHA.1604@TK2MSFTNGP10.phx.gbl...
    > 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
    > news:ODboq5$UFHA.3544@TK2MSFTNGP12.phx.gbl...
    > > 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" <Gujo_454@hotmail.com> wrote in message
    > > news:OL7jHk$UFHA.1508@tk2msftngp13.phx.gbl...
    > >> 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 to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1