Advertisement

01.20.2006 at 07:37AM PST, ID: 21704111
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

8.4

Custom command bar help!

Asked by burgomaster in Microsoft Excel Spreadsheet Software

Tags: ,

Hello,
I am implementing a command bar that allows users to select any worksheet from the dropdown menu in this bar, and also let user to go home, go to the next page, or previous page with a button click.  I accomplished all these, however, when users select next page, previous page, or home or even just click on the tab, I would like the sheet name to appears on this dropdown menu as well.  Anybody please shows me the solution..
Thanks!

****This is the code that I have so far*****
 
Private Sub CommandButton2_Click()
On Error Resume Next
'Just in case another exists, delete it.
 Application.CommandBars("Navigate").Delete
  MsgBox (ActiveWorkbook.ActiveSheet.Name)

On Error GoTo 0
'Add New Navbar.
With Application.CommandBars.Add("Navigate", , False, False)

    'Set position
    With Application.CommandBars("Navigate")
        If .Position <> msoBarTop Then .Position = msoBarTop
    End With
   
    'Create Home button
    With .Controls.Add(msoControlButton)
        .TooltipText = "Show Graph Page"
        .FaceId = 1016
        .OnAction = "'" & ThisWorkbook.Name & "'!Sheet1.Go_Home"
        .BeginGroup = True
    End With

    'Create left arrow button
    With .Controls.Add(msoControlButton)
        .TooltipText = "Previous Report"
        .FaceId = 1017
        .OnAction = "'" & ThisWorkbook.Name & "'!Sheet1.Sheet_Before"
        .BeginGroup = True
    End With

    'Create Drop Down list box of Worksheet Names
    With .Controls.Add(msoControlDropdown)
        Dim ws As Worksheet
        For Each ws In ActiveWorkbook.Worksheets
       
            If ws.Visible = xlSheetVisible Then
                .AddItem ws.Name
            End If
        Next ws
        .Width = 200
        .TooltipText = "SheetNavigation"
        .OnAction = "'" & ThisWorkbook.Name & "'!Sheet1.SN"
    End With
   
    'Create right arrow button
    With .Controls.Add(msoControlButton)
        .TooltipText = "Next Report"
        .FaceId = 1018
        .OnAction = "'" & ThisWorkbook.Name & "'!Sheet1.Next_Sheet"
    End With

    .Protection = msoBarNoCustomize
    .Visible = True
   
End With

End Sub

Public Sub Go_Home()
'Activate First sheet
Worksheets("Sheet1").Activate

End Sub

Public Sub SN()
'Sheet Navigation - Activates selected sheet.
Dim stActiveSheet As String

'Choose sheet from drop down
With CommandBars.ActionControl
    stActiveSheet = .List(.ListIndex)
End With

'Activate chosen sheet
Worksheets(stActiveSheet).Activate

End Sub

Public Sub Sheet_Before()
'Go to previous sheet
On Error Resume Next
ActiveSheet.Previous.Select
End Sub

Public Sub Next_Sheet()
'Go to next sheet
On Error Resume Next
ActiveSheet.Next.Select
End SubStart Free Trial
[+][-]01.20.2006 at 08:22AM PST, ID: 15750281

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Microsoft Excel Spreadsheet Software
Tags: msocontroldropdown, msocontrolbutton
Sign Up Now!
Solution Provided By: jeverist
Participating Experts: 1
Solution Grade: A
 
 
[+][-]01.20.2006 at 08:30AM PST, ID: 15750347

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]01.20.2006 at 08:37AM PST, ID: 15750404

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01.20.2006 at 08:46AM PST, ID: 15750484

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]01.20.2006 at 09:05AM PST, ID: 15750691

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]01.20.2006 at 10:51AM PST, ID: 15751591

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01.20.2006 at 01:28PM PST, ID: 15752922

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]01.20.2006 at 01:49PM PST, ID: 15753073

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]01.20.2006 at 01:56PM PST, ID: 15753123

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01.20.2006 at 02:00PM PST, ID: 15753156

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32