Wrox Programmer Forums
|
Beginning VB 6 For coders who are new to Visual Basic, working in VB version 6 (not .NET).
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Beginning VB 6 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 5th, 2007, 04:00 AM
Registered User
 
Join Date: Mar 2007
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Help to get a Toolbar active

I try again with a shorter comment

I have done the following:
1. Made many code in VBA for aplications Ok
2. Saved these code as addin "'.xla" OK
3. Generate menu in the "Worksheet Menu Bar" OK
4. The the Macro eq. "goto_home" or program is called by <.OnAction = "goto_home">.
My problem is that excel do not find the "goto_home"

Is it some one that have any suggestion of what is going wrong?




Sub AddcustomMenu()

Dim cbWsMenuBar As CommandBar
Dim muCustom As CommandBarControl
Dim iHelpIndex As Integer

Set cbWsMenuBar = CommandBars("Worksheet Menu Bar")
iHelpIndex = cbWsMenuBar.Controls("Help").Index
Set muCustom = cbWsMenuBar.Controls.Add(Type:=msoControlPopup, before:=iHelpIndex)
With muCustom
    .Caption = "&Go To"
    With .Controls.Add(Type:=msoControlButton)
            .Caption = "Et &Go Home"
            .OnAction = "goto_home"
   End With
     With .Controls.Add(Type:=msoControlButton)
         .OnAction = "goto_table_general"
         .FaceId = 2151
         .Caption = "Go to table 111"
         .Parameter = 1
      End With
End With

End Sub







Similar Threads
Thread Thread Starter Forum Replies Last Post
ToolBar Help reyboy VB.NET 2002/2003 Basics 2 April 19th, 2005 08:35 PM
About the toolbar momowu0701 BOOK: Beginning VB.NET 2nd Edition/Beginning VB.NET 2003 0 March 1st, 2005 09:23 AM
Toolbar amantona Crystal Reports 0 May 12th, 2004 09:41 AM
Toolbar sangata VS.NET 2002/2003 2 April 13th, 2004 05:14 AM
Image in ToolBar poornima_polaris Visual C++ 0 December 9th, 2003 12:26 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.