VBA Express Forum  




Go Back   VBA Express Forum > VBA Code & Other Help > Excel Help
     Feedback     
Register FAQ Members Arcade Knowledge Base Training Articles Consulting

Reply
 
Thread Tools Display Modes
Old 04-16-2012, 03:38 AM   #1
selvajan23

 
Joined: Feb 2012
Posts: 10
Kb Entries: 0
Articles: 0
Post How to add a Custom menu TAB for Seperate work book

Dear all,

Can any one help me on this,

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.

Regards,
Selva.C

Local Time: 07:41 PM
Local Date: 05-23-2013
Location:

 
Reply With Quote Top
Old 04-16-2012, 06:11 AM   #2
Jan Karel Pieterse
MS Excel MVP

 
Joined: Apr 2006
Posts: 632
Kb Entries: 0
Articles: 0
Check out this page:
http://www.rondebruin.nl/ribbon.htm


Regards,

Jan Karel Pieterse
Excel MVP
JKP Application Development Services
Founding member of:
www.excelexperts.nl

Local Time: 04:11 PM
Local Date: 05-23-2013
Location:

 
Reply With Quote Top
Old 04-16-2012, 06:36 AM   #3
selvajan23

 
Joined: Feb 2012
Posts: 10
Kb Entries: 0
Articles: 0
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

Thanks in advance.

Local Time: 07:41 PM
Local Date: 05-23-2013
Location:

 
Reply With Quote Top
Old 04-16-2012, 08:12 AM   #4
Jan Karel Pieterse
MS Excel MVP

 
Joined: Apr 2006
Posts: 632
Kb Entries: 0
Articles: 0
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.


Regards,

Jan Karel Pieterse
Excel MVP
JKP Application Development Services
Founding member of:
www.excelexperts.nl

Local Time: 04:11 PM
Local Date: 05-23-2013
Location:

 
Reply With Quote Top
Old 04-17-2012, 04:57 AM   #5
selvajan23

 
Joined: Feb 2012
Posts: 10
Kb Entries: 0
Articles: 0
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.

Local Time: 07:41 PM
Local Date: 05-23-2013
Location:

 
Reply With Quote Top
Old 04-17-2012, 05:36 AM   #6
Jan Karel Pieterse
MS Excel MVP

 
Joined: Apr 2006
Posts: 632
Kb Entries: 0
Articles: 0
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.


Regards,

Jan Karel Pieterse
Excel MVP
JKP Application Development Services
Founding member of:
www.excelexperts.nl

Local Time: 04:11 PM
Local Date: 05-23-2013
Location:

 
Reply With Quote Top
Old 04-17-2012, 06:38 AM   #7
selvajan23

 
Joined: Feb 2012
Posts: 10
Kb Entries: 0
Articles: 0
Post

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

VBA:
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
VBA tags courtesy of www.thecodenet.com
even i tried this
VBA:
Application.CommandBars("Nokia").Visible = True
VBA tags courtesy of www.thecodenet.com


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.

Local Time: 07:41 PM
Local Date: 05-23-2013
Location:

 
Reply With Quote Top
Old 04-17-2012, 06:50 AM   #8
Jan Karel Pieterse
MS Excel MVP

 
Joined: Apr 2006
Posts: 632
Kb Entries: 0
Articles: 0
Are you sure that commandbar "Nokia" or "Worksheet Nokia" exists?


Regards,

Jan Karel Pieterse
Excel MVP
JKP Application Development Services
Founding member of:
www.excelexperts.nl

Local Time: 04:11 PM
Local Date: 05-23-2013
Location:

 
Reply With Quote Top
Old 04-18-2012, 07:22 AM   #9
selvajan23

 
Joined: Feb 2012
Posts: 10
Kb Entries: 0
Articles: 0
Post

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.

Local Time: 07:41 PM
Local Date: 05-23-2013
Location:

 
Reply With Quote Top
Old 04-18-2012, 07:42 AM   #10
Jan Karel Pieterse
MS Excel MVP

 
Joined: Apr 2006
Posts: 632
Kb Entries: 0
Articles: 0
Could you please attach a screenshot of your "menu bar", so we know what you are talking about?.


Regards,

Jan Karel Pieterse
Excel MVP
JKP Application Development Services
Founding member of:
www.excelexperts.nl

Local Time: 04:11 PM
Local Date: 05-23-2013
Location:

 
Reply With Quote Top
Old 04-18-2012, 08:11 AM   #11
selvajan23

 
Joined: Feb 2012
Posts: 10
Kb Entries: 0
Articles: 0
Post

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.
Attached Images To view attachments your post count must be 0 or greater. Your post count is 0 momentarily.

Local Time: 07:41 PM
Local Date: 05-23-2013
Location:

 
Reply With Quote Top
Old 04-20-2012, 07:55 AM   #12
Jan Karel Pieterse
MS Excel MVP

 
Joined: Apr 2006
Posts: 632
Kb Entries: 0
Articles: 0
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


Regards,

Jan Karel Pieterse
Excel MVP
JKP Application Development Services
Founding member of:
www.excelexperts.nl

Local Time: 04:11 PM
Local Date: 05-23-2013
Location:

 
Reply With Quote Top
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -7. The time now is 07:11 AM.


Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Copyright © 2004 - 2012 VBA Express