Excel VBA - Custom Menu Bar

I have created a custom menu bar..a section of the code below...but d
not know how to create a 2nd level to look like the example below.

Period >
Month >
Current Year (action)

Any suggestions.  Thanks.

'   Add a new menu
Set NewMenu = NewMenuBar.Controls.Add _
(Type:=msoControlPopup)
NewMenu.Caption = "&Period"
'   Add a new menu item
Set NewItem = NewMenu.Controls.Add(Type:=msoControlButton)
With NewItem
.Caption = "&By Month"
.OnAction = "Main"
End Wit

--
Message posted from http://www.ExcelForum.com

0
9/15/2004 1:27:16 PM
excel.misc 78881 articles. 5 followers. Follow

1 Replies
401 Views

Similar Articles

[PageSpeed] 52

You should find your answer here (look under submenus):

How to customize menus and menu bars in Excel:
http://support.microsoft.com/default.aspx?scid=830502

HTH
Jason
Atlanta, GA

>-----Original Message-----
>I have created a custom menu bar..a section of the code 
below...but do
>not know how to create a 2nd level to look like the 
example below.
>
>Period >
>Month >
>Current Year (action)
>
>Any suggestions.  Thanks.
>
>'   Add a new menu
>Set NewMenu = NewMenuBar.Controls.Add _
>(Type:=msoControlPopup)
>NewMenu.Caption = "&Period"
>'   Add a new menu item
>Set NewItem = NewMenu.Controls.Add
(Type:=msoControlButton)
>With NewItem
>.Caption = "&By Month"
>.OnAction = "Main"
>End With
>
>
>---
>Message posted from http://www.ExcelForum.com/
>
>.
>
0
Jason
9/15/2004 1:47:03 PM
Reply:

Similar Artilces:

Formatting excel worksheets
I got an inventory spreadsheet from wizard that I like a lot but as I add rows to it I lose the alternated shading to the rows. I only know how to fix it by manually changing the shading of each row, which is very time consuming. Is there any way to set it up so that the shading automatically corrects after adding to a worksheet? Hi Use this http://www.cpearson.com/excel/banding.htm -- Regards Ron de Bruin http://www.rondebruin.nl "maggiemae" <maggiemae@discussions.microsoft.com> wrote in message news:6EAE1F43-6EA2-4525-8026-2B42668F28A1@microsoft.com... > I got ...

Using a Word, PDF, Image as a background on Excel.
Hello professionals, I would appreciate some help on this problem. Im a pretty good basic user of excel and generally dont need anything complex, but I cant figure out if I can do what I want with the information I want. I use Excel for my jobs to generate reports, submittals, etc. I am a sub contractor on this particular jobsite with plenty of additional forms I must fill out for the general contractor. The contrator wants me to fill out the same reports I fill out on my forms onto his forms. He created these forms on Word, and I have paper copies of them. I will be receiving a cd with...

How do I insert a watermark such as "draft" in Excel 2002
How do I insert a watermark such a "draft copy" in Excel 2002? Hi see: http://www.xldynamic.com/source/xld.xlFAQ0005.html -- Regards Frank Kabel Frankfurt, Germany "hwrogers" <hwrogers@discussions.microsoft.com> schrieb im Newsbeitrag news:1DCA8792-ADBA-4491-9FC6-BBE2FDFD4E2A@microsoft.com... > How do I insert a watermark such a "draft copy" in Excel 2002? ...

Where is Excel.h?
I just looked at KB article Q178749 and followed all the steps. Where in the world do you get Excel.h from? I searched my whole PC and this file was not found (I have Office 2003 installed). There aren't too many search results from people that have had this problem, so I'm missing something here. Does anyone know where I can find excel.h? Thanks in advance! Aruk I would guess that this file would be generated when you import the type library. Did you try importing it as mentioned in steps 8-10 of Q178749? --------- Ajay Kalra ajaykalra@yahoo.com UN-BELIEVEABLE!!!! Well I...

Scroll Mouse in VBA 2003
Since moving from Office 2000 to 2003 the Scroll wheel does not work in the Excel VBA Editor. Anyone know a fix? The MS 4.x driver works fine for me in all versions of Excel for scrolling modules in the VBE. The 5.x driver does not, so I downgraded after trying it. Some people swear by this as a fix for 5.x: http://www.gasanov.net/VBScroll.htm -- Jim Rech Excel MVP "A. Morolez" <anonymous@discussions.microsoft.com> wrote in message news:c08301c489e5$a9462880$a501280a@phx.gbl... | Since moving from Office 2000 to 2003 the Scroll wheel | does not work in the Excel V...

how can I use my e-mail addresses on excel xp with microsoft outlo #2
I need to use my addresses on Excel xp with Microsoft outlook. I want to use my excel file as a database that I can change and improve everyday. I need to send mails to more than 1 contact, so creating an e.mail link is not enough for me: in fact, if I click on it, I send my mail only to 1 address... Txs ...

Recover Excel file
Is there a way to get an autorecover file, if I closed Excel without saving changes? Hi Jimp, If you have seen the "autorecovery" message, when you closed the Excel, then definitely you can recover that file. It is there in the left pane when you open you Excel again else you can search Excel installation folders as well. -- Click on Yes, if it is useful. Thanks & Best Regards, Dilip Kumar Pandey MBA, BCA, B.Com(Hons.) dilipandey@yahoo.com dilipandey@gmail.com New Delhi, India "jimp" wrote: > Is there a way to get an autorecover file, if I closed Excel wi...

2 Bars and 2 Y Axis Chart
When I try to create a chart with 2 bars with two different Y axis, Excel stacks the bars. I just want two seperate bars. I change one to a line it works fine. Please Help ... am I missing something? Thanks DG This article might help: http://peltiertech.com/Excel/Charts/ColumnsOnTwoAxes.html - Jon ------- Jon Peltier, Microsoft Excel MVP Peltier Technical Services Tutorials and Custom Solutions http://PeltierTech.com/ _______ DG wrote: > When I try to create a chart with 2 bars with two different Y axis, Excel > stacks the bars. I just want two seperate bars. I change o...

Formatting the result of a VLookup / Custom Formatting #2
Hi, I am having difficulty formatting a cell which contains both text and a VLOOKUP formulae. I have an example of the cell below: ="Here lies the text before Vlookup " &VLOOKUP($M$20,sheet1!$B$10:$L$1445,8,FALSE)&" Here lies follow-up text" The VLookup should return a date but instead is returning a string of numbers. I'm sure there is a way of setting the format within the formulae using dd/mm/yy somewhere. Could anyone tell me how to do this? ...

Losing Customized Toolbars
Excel 2000, Office 2000 Professional (SR1) running on Windows 2000 Professional (local profile). A user (our Financial Controller - typical!) has customized toolbars in Excel, upon closing Excel however, he loses the icons he has added when he next opens the application. Is this a problem with his PERSONAL.XLS file in the XLSTART folder. If so, does anyone have a solution? Any assistance would be appreciated. Cheers, Mike What's "Typical!" >-----Original Message----- >Excel 2000, Office 2000 Professional (SR1) running on >Windows 2000 Professional (local ...

Excel 2007 Smart Forms
Is there a web site that I can go to get find Excel 2007 Smart forms for free? I am trying to create a user form that will not let a user go on to the next question or worksheet without filling out all required information first. I would also like it to not let a user hit the submit until all required information is filled out. I am new to VBA and don't even know if I need to use VBA to make my above requirements work. Any help would be greatly appreciated. Keven ...

Excel Cell format Question??
How do I change the default value of a cell from 0 to a different number? A cell has no default number unless you placed it there. OR........do you mean if you enter a formula such as =12*A1 you get 0 if A1 is empty? You could use an IF in your formula. =IF(A1="",yournumber,12*A1) where yournumber is whatever you wish it to be. Gord Dibben Excel MVP On Fri, 1 Oct 2004 09:09:03 -0700, GMoore <GMoore@discussions.microsoft.com> wrote: >How do I change the default value of a cell from 0 to a different number? ...

how do I set up a moving average in Excel #2
I am trying to set up a 7 day moving average and cannot figure out how to set it up? Any help would be great. Assume you have numbers to average in row 1, beginning at column 1 and going across the sheet. At G2, enter this formula: =AVERAGE(A1:G1) and simply extend the formula to the right, it will automatically give the average of the value above it and in the 6 cells to the right of that cell, sliding as it goes. Hope this helps. "p-nut" wrote: > I am trying to set up a 7 day moving average and cannot figure out how to set > it up? Any help would be great. ...

Excel Macro Filtered Visible Cells
Data is filtered in-place: I then need to perform a calculation on th Visible Filtered cells using the Frequency function. My code return the values for the whole list, instead of just the Filtered Visibl cells of the Frequency Results(Freq_Results). Freq_Results=Named Range of All Unfiltered Frequency Results, the filtered in_place Frequencies=Named Range Number of Times Bins=Named Range of Intervals Range("Freq_Results").SpecialCells(xlVisible).Select Range("Frequencies").Select Selection.FormulaArray = ("=Frequency(Freq_Results,Bins)") Excel Help - Frequ...

entering data in excel invoices
-- TomA --- PattiD .. >-----Original Message----- > >-- >TomA >. > ...

Customizing Public Folder Columns
Hi, I have noticed that Public Folders show up in Outlook with a default set of columns/fields that I can then change on the client. What I am trying to do is to have a Public Folder appear with a specific set of columns (different than the default) for ALL users without me having to go on each Outlook client and set it up manually. Like a Folder-level setting as opposed to a client-level setting. Is this possible? Our server is Exchange 2003. The clients are mixed Outlook 2000, XP and 2003. If this can only work for some client versions can you please let me know which ones? thank...

Excel Error Message When Opening A File
The boss's computer using Excel 97 under Windows XP gets this error when opening a file: "A document with the name xxxx.xls is already open. You cannot open two documents with the same name, even if the documents are in different folders. To open the second document, either close the document that's currently open, or rename one of the documents." There is no other copy of the document open. I would appreciate it if anyone knows how to stop this. My boss would appreciate it if I could solve this problem he is having. Thanks. From Debra Dalgleish's site: http...

Excel Function
I'm working on a program and need the following function to work I have one cell that gets the information from an other spread sheet The cell next to it I enter data When sorting the outside spread sheet the data in the one I'm working are changing also. How can I have the cell that I enterred date to follow? Hi To follow what? In what sense? Paul On Mar 23, 7:59=A0pm, Harry <Ha...@discussions.microsoft.com> wrote: > I'm working on a program and need the following function to work > I have one cell that gets the information from an other spread sheet &...

Microsoft Excel
I bought office 2004 for students and teachers, after the installation I launched Excel but an error message appeared: 'office:Macros complementaires:Eurotools.xla' could not be found "Check the spelling of the file name, and verify that the file location is correct. If you are trying to open the file from your list of most recently used files on the File menu, make sure that the file has not been renamed, moved or deleted" What can I do to not have this message again? Thanks Hello Tatjana, Please run Apple Disk Utility and repair permssions, then open Excel and try again...

The line color in excel is greyed out. How can I fix?
I am trying to change the color of my border to a lighter grey but when I go to drawing on the toolbar and then to line color,it is greyed out. I have tried highlighting the border that I want to change but still doesn't work. Help! one way Format>Cells>Border>Color is a drop down palete HTH "Carley in Invermere" wrote: > I am trying to change the color of my border to a lighter grey but when I go > to drawing on the toolbar and then to line color,it is greyed out. I have > tried highlighting the border that I want to change but still doesn't work....

VBA
I would really appreciate any help. How can I open a second instance of access and require that be closed before the user can return to the first instance from which it was called? Thank you Hi Use a shell call with (after shell) docmd.quit on the 1st DB (or the 2nd if you want to go back to the 1st) - hope that makes sense. -- Wayne Manchester, England. "Programmer - wannaB" wrote: > I would really appreciate any help. > How can I open a second instance of access and require that be closed before > the user can return to the first instance from which it was call...

goal line in excel chart
How do I add a line that shows the goal to a chart. Hi, Try this example, http://peltiertech.com/Excel/Charts/AddLine.html http://www.andypope.info/charts/averageline.htm http://www.tushar-mehta.com/excel/charts/straight_lines/index.html Cheers Andy Warren Lehndorfer wrote: > How do I add a line that shows the goal to a chart. -- Andy Pope, Microsoft MVP - Excel http://www.andypope.info ...

Presentation help needed using excel and powerpoint
There is a meeting coming where every one speaker are given one minute time to give their speech. There are two computers and two users to keep track of speeches and show them (current speech on top, next below and so on) on a large screen. Other types names of the speakers to the excel and other updates the list and displays it using powerpoint. Need help how to transfer files between computers effectively and so that screen is only updated. Thanks ...

Graphic template Excel 1997
Hi, I have some template of Graphic in an Excel file. I have a workbook with the graphic, one with the data and one with some constant (Contain the information about the legend and stuff like this) . When I modify the data of the constant, the layout of the graphic change. Is there a way to prevent this? Thanks, ...

Locate Customer By field
Why does the locate customer by field in the cash receipts not automatically mark/apply the invoice you entered? I think this would be a nice feature in future releases. ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree" button in the message pane. If you do not see the button, follow this link to open the suggestion in the Microsoft Web-based Newsreader and then click "I Agree" in the message pane. http://www.microsoft.com/Businesssolutions/Commun...