PDA

View Full Version : How to add a Custom menu TAB for Seperate work book



selvajan23
04-16-2012, 03:38 AM
Dear all, :hi:

Can any one help me on this, :dunno

I need to add a own menu tab and its option or button for seperate work book alone which should not be visible in other workbook.

FYI : I am using excel 2010 and the excel file is macro enabled file(.xlsm)

Please help me on this.Its urgent.:doh:

Regards,
Selva.C

Jan Karel Pieterse
04-16-2012, 06:11 AM
Check out this page:
http://www.rondebruin.nl/ribbon.htm

selvajan23
04-16-2012, 06:36 AM
Hi ,

Thanks for your time and help.

Is there any possiblity to show/hide our own menu tab for seperate workbook.

For me no permission to download and install any new s/w.

Please provide me how to hide my menu tab for other workbooks.

I will tell more clearly about my need.

I have developed a macro code and i need to call it through some menu options that menu should be available in that work book alone,

Please assist on this http://www.mrexcel.com/forum/images/smilies/frown.gif

Thanks in advance.

Jan Karel Pieterse
04-16-2012, 08:12 AM
Ribbon customisations are workbook specific, except for add-ins. So if you have a "normal" xlsm file, all you have to do is add the RibbonX code, Excel handles the hiding and showing of your new tab.

selvajan23
04-17-2012, 04:57 AM
Hi Thanks for your reply.

See my need is that just to show a menu tab in a seperate work book.

when i open other .xlsm file that menu should not displayed.

for this please help me.

Jan Karel Pieterse
04-17-2012, 05:36 AM
The web page I pointed you to explains how to do exactly that.
I suggest you to go to that page and read it carefully.

selvajan23
04-17-2012, 06:38 AM
Thanks for helping me till this time.

Its showing "Invalid procedure call or argument" error
Please have a look on my code.

My menu name is Nokia

Private Sub Workbook_Open()
Application.CommandBars("Worksheet Nokia").Visible = True
End Sub

Private Sub Workbook_BeforeClose(Cancel As Boolean)
Application.CommandBars("Worksheet Nokia").Visible = False
End Sub

even i tried this
Application.CommandBars("Nokia").Visible = True


Can you please help me to clear this issue.
and also one more thing
i have the sheets name as pen1,pen2,pen3

i need to display my menu on for the pen2.

Please assist on my code.Its almost 60% finished.

Jan Karel Pieterse
04-17-2012, 06:50 AM
Are you sure that commandbar "Nokia" or "Worksheet Nokia" exists?

selvajan23
04-18-2012, 07:22 AM
Hey Its not command bar,

I have created a menu bar named "nokia".

i have to hide it for sepearate workbook,
for that i have tried that code which was taken from net,
if my codes are wrong please help me to get it.

Jan Karel Pieterse
04-18-2012, 07:42 AM
Could you please attach a screenshot of your "menu bar", so we know what you are talking about?.

selvajan23
04-18-2012, 08:11 AM
Please have a look on my nokia menu bar in the attachment,

I have specified that how did i add my menu and also added menu in thaat screenshot.

Now my need is that i need that menu for my single workbook.

if i open any other workbook it shoul not be visible.

Please let me know if you have any other comments.

Jan Karel Pieterse
04-20-2012, 07:55 AM
Again. You can't do this with VBA.
Go to Ron de Bruin's website. He explains how to do this stuff here:

http://www.rondebruin.nl/ribbon.htm