Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default save command bar into an excel workbook using vb

Hello, I want to save a custom command bar into an excel workbook.
Instead of doing that manually, I want to do with Vb code (before close,
join the command bar to the book, and delete the bar).

The Vb help says I can do it using the command bar property "context"
<Application.CommandBars("BarName").Context, but I do not know how to use
context (there is no example).
Does anyone know how to do it?

Thanks in advance


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default save command bar into an excel workbook using vb

http://support.microsoft.com/?id=159619
XL97: Sample Macros for Customizing Menus and Submenus

http://support.microsoft.com/?id=213550
XL2000: Sample Macros for Customizing Menus and Submenus


http://support.microsoft.com/default...b;en-us;166755
File Title: Customizing Menu Bars, Menus, and Menu Items in Microsoft(R)
Excel 97
File Name: WE1183.EXE
File Size: 58041 bytes
File Date: 06/20/97
Keywords: kbfile kbappnote
Description: This Application Note can help you learn techniques for writing
Visual Basic(R) for Applications code to customize menus in Microsoft Excel
97. This Application Note contains code examples that you can use with the
following elements: menu bars, menus, menu items, submenus, and shortcut
menus.


Should give you the type of information you need.

--
Regards,
Tom Ogilvy

"José Ignacio Bella" wrote in message
...
Hello, I want to save a custom command bar into an excel workbook.
Instead of doing that manually, I want to do with Vb code (before close,
join the command bar to the book, and delete the bar).

The Vb help says I can do it using the command bar property "context"
<Application.CommandBars("BarName").Context, but I do not know how to use
context (there is no example).
Does anyone know how to do it?

Thanks in advance




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 172
Default save command bar into an excel workbook using vb

John has a Webpage that offers an addin. The code is unprotected, so
you can see his methodology.

John Walkenbach : Create a Toolbar on the Fly
http://j-walk.com/ss/excel/tips/tip90.htm

HTH
Paul
--------------------------------------------------------------------------------------------------------------
Be advised to back up your WorkBook before attempting to make changes.
--------------------------------------------------------------------------------------------------------------

Hello, I want to save a custom command bar into an excel workbook.
Instead of doing that manually, I want to do with Vb code (before close,
join the command bar to the book, and delete the bar).

The Vb help says I can do it using the command bar property "context"
<Application.CommandBars("BarName").Context, but I do not know how to use
context (there is no example).
Does anyone know how to do it?

Thanks in advance


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default save command bar into an excel workbook using vb

Hello Tom
I have looked at these articles, but I haven't found what I'm looking for.

I'm working with Excel97. I have built a custom command bar with some
macros, for some friends in the office. The macros code is in an xla.

I have manually saved (joined) this command bar to en excel workbook. If
someone opens the book, the command bar appears, and it remains in Excel
application.

I do not like to create the bar trough code (the bar has custom icons, etc).
It's easy for me to create it manually

I only wanted to have some code in the book that contains the command bar
(in the Before Close event), to be sure that the bar is always saved after I
made changes.

Excuse my poor English. I hope it's enought clear. I have posted the same
question in the Spanish Excel forum, but they say I can no join a custom
command bar to a book with code (only manually). That's the reason to post
the question here.

Thxs again!











"Tom Ogilvy" escribió en el mensaje
...
http://support.microsoft.com/?id=159619
XL97: Sample Macros for Customizing Menus and Submenus

http://support.microsoft.com/?id=213550
XL2000: Sample Macros for Customizing Menus and Submenus


http://support.microsoft.com/default...b;en-us;166755
File Title: Customizing Menu Bars, Menus, and Menu Items in Microsoft(R)
Excel 97
File Name: WE1183.EXE
File Size: 58041 bytes
File Date: 06/20/97
Keywords: kbfile kbappnote
Description: This Application Note can help you learn techniques for

writing
Visual Basic(R) for Applications code to customize menus in Microsoft

Excel
97. This Application Note contains code examples that you can use with the
following elements: menu bars, menus, menu items, submenus, and shortcut
menus.


Should give you the type of information you need.

--
Regards,
Tom Ogilvy

"José Ignacio Bella" wrote in message
...
Hello, I want to save a custom command bar into an excel workbook.
Instead of doing that manually, I want to do with Vb code (before close,
join the command bar to the book, and delete the bar).

The Vb help says I can do it using the command bar property "context"
<Application.CommandBars("BarName").Context, but I do not know how to

use
context (there is no example).
Does anyone know how to do it?

Thanks in advance






  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default save command bar into an excel workbook using vb

Commandbars are application level. Once it is created, it is not really
related to the commandbar you attached to your workbook. If you make
changes to it where you are working (where it was created by opening the
workbook). Those changes will be saved automatically.

If you mean you want to change it where you first created it and have it
updated in the workbook where you attached it, I believe you have to do that
manually.


Here is an article which talks about attaching toolbars:

http://www.microsoft.com/exceldev/articles/toolbatt.htm

--
Regards,
Tom Ogilvy


"José Ignacio Bella" wrote in message
...
Hello Tom
I have looked at these articles, but I haven't found what I'm looking for.

I'm working with Excel97. I have built a custom command bar with some
macros, for some friends in the office. The macros code is in an xla.

I have manually saved (joined) this command bar to en excel workbook. If
someone opens the book, the command bar appears, and it remains in Excel
application.

I do not like to create the bar trough code (the bar has custom icons,

etc).
It's easy for me to create it manually

I only wanted to have some code in the book that contains the command bar
(in the Before Close event), to be sure that the bar is always saved after

I
made changes.

Excuse my poor English. I hope it's enought clear. I have posted the same
question in the Spanish Excel forum, but they say I can no join a custom
command bar to a book with code (only manually). That's the reason to post
the question here.

Thxs again!











"Tom Ogilvy" escribió en el mensaje
...
http://support.microsoft.com/?id=159619
XL97: Sample Macros for Customizing Menus and Submenus

http://support.microsoft.com/?id=213550
XL2000: Sample Macros for Customizing Menus and Submenus


http://support.microsoft.com/default...b;en-us;166755
File Title: Customizing Menu Bars, Menus, and Menu Items in Microsoft(R)
Excel 97
File Name: WE1183.EXE
File Size: 58041 bytes
File Date: 06/20/97
Keywords: kbfile kbappnote
Description: This Application Note can help you learn techniques for

writing
Visual Basic(R) for Applications code to customize menus in Microsoft

Excel
97. This Application Note contains code examples that you can use with

the
following elements: menu bars, menus, menu items, submenus, and shortcut
menus.


Should give you the type of information you need.

--
Regards,
Tom Ogilvy

"José Ignacio Bella" wrote in message
...
Hello, I want to save a custom command bar into an excel workbook.
Instead of doing that manually, I want to do with Vb code (before

close,
join the command bar to the book, and delete the bar).

The Vb help says I can do it using the command bar property "context"
<Application.CommandBars("BarName").Context, but I do not know how to

use
context (there is no example).
Does anyone know how to do it?

Thanks in advance








Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Disable 'save' command in Excel 2000 Silena K-K Excel Discussion (Misc queries) 7 December 10th 07 09:23 PM
Can I disable the Save command for an Excel file? Frali Excel Discussion (Misc queries) 1 September 14th 07 08:43 PM
Excel save command Teddy Excel Discussion (Misc queries) 2 September 14th 07 08:34 PM
Command Button Save As Application.ExecuteExcel4Macro ("SAVE.AS?() Paul Dennis Excel Discussion (Misc queries) 5 September 18th 06 05:34 PM
How do i convert excel to csv in command line? ( not save as) F1 Excel Discussion (Misc queries) 1 June 1st 05 03:51 AM


All times are GMT +1. The time now is 05:31 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"