Results 1 to 5 of 5

Command Bars

Threaded View

JezLisle Command Bars 04-16-2009, 03:57 AM
Andy Pope Re: Command Bars 04-16-2009, 08:02 AM
JezLisle Re: Command Bars 04-17-2009, 04:11 AM
Andy Pope Re: Command Bars 04-17-2009, 05:35 AM
JezLisle Re: Command Bars 04-17-2009, 06:35 AM
  1. #1
    Forum Contributor
    Join Date
    06-06-2008
    Location
    Manchester
    MS-Off Ver
    MS Office 2003
    Posts
    161

    Command Bars

    I have this code below which creates a CommandBar but my problem is that I thought the line of Code .Width 100 would make the width of the actual CommandBar increase if I adjusted that number, but this doesnt seem to be the case. The title in only shows Nursing Sta instead of Nursing Staff Rota.

    How can I make the CommandBar wider than is?

    Sub ShowMenu()
    Dim cmdBar As CommandBar
    Dim cmdPopup As CommandBarPopup
    Dim cmdButton As CommandBarButton
    
        DeleteMenu
        Set cmdBar = CommandBars.Add(Name:="Nursing Staff Rota", _
        Position:=msoBarFloating, Temporary:=True)
        With cmdBar
            .Top = 250
            .Left = 900
            Set cmdPopup = .Controls.Add(Type:=msoControlPopup)
            With cmdPopup
                .Caption = "Create New Rota"
                .BeginGroup = True
                Set cmdButton = .Controls.Add(Type:=msoControlButton)
                With cmdButton
                    .Caption = "Create New Rota"
                    .Style = msoButtonCaption
                    .BeginGroup = True
                    .OnAction = "ChangeRotaWeek"
                End With
                Set cmdButton = .Controls.Add(Type:=msoControlButton)
                With cmdButton
                    .Caption = "Add New Nursing Staff"
                    .Style = msoButtonCaption
                    .BeginGroup = True
                    .OnAction = "CopyRow"
                End With
                Set cmdButton = .Controls.Add(Type:=msoControlButton)
                With cmdButton
                    .Caption = "Exit Nursing Staff Rota"
                    .Style = msoButtonCaption
                    .BeginGroup = True
                    .OnAction = "ExitRota"
                End With
            End With
            .Width = 100
            .Visible = True
        End With
    End Sub
    Last edited by JezLisle; 04-17-2009 at 06:35 AM.

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