Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
mike_mike
 
Posts: n/a
Default Creating toolbars thru VBA

Hi

Is it possible to create a tool bar thru VB code? and check if it exists for
that user, if it dosen't then create it. I want all users of a shared spread
sheet to get the same toolbar. I don't want to over write the XLB file below
as suggested below, in case it overwrites there current toolbar seetings..





Some one suggests



Menu and Toolbar customizations are stored in your *.XLB file.

Version 97 is username.xlb and found in C:\Windows folder.

Versions 2000 through 2003 are Excel9, Excel10 and Excel11.xlb and would be
found in

Documents and Settings\yourname\application data\microsoft\Excel

One method is to send your *.XLB file to the other user and have that user
overwrite their own *.xlb with yours.

Another method is to Attach the Toolbar(ToolsCustomizeToolbars) to a file
and send that file.


Gord Dibben Excel MVP

On Mon, 13 Jun 2005 14:52:03 -0700, "Tasha"
wrote:

I have my Excel toolbars just the way I like it and I was wondering if there
was a way to share the toolbar with another user?



  #2   Report Post  
Dave Peterson
 
Posts: n/a
Default

See your other post.

mike_mike wrote:

Hi

Is it possible to create a tool bar thru VB code? and check if it exists for
that user, if it dosen't then create it. I want all users of a shared spread
sheet to get the same toolbar. I don't want to over write the XLB file below
as suggested below, in case it overwrites there current toolbar seetings..

Some one suggests

Menu and Toolbar customizations are stored in your *.XLB file.

Version 97 is username.xlb and found in C:\Windows folder.

Versions 2000 through 2003 are Excel9, Excel10 and Excel11.xlb and would be
found in

Documents and Settings\yourname\application data\microsoft\Excel

One method is to send your *.XLB file to the other user and have that user
overwrite their own *.xlb with yours.

Another method is to Attach the Toolbar(ToolsCustomizeToolbars) to a file
and send that file.

Gord Dibben Excel MVP

On Mon, 13 Jun 2005 14:52:03 -0700, "Tasha"
wrote:

I have my Excel toolbars just the way I like it and I was wondering if there
was a way to share the toolbar with another user?


--

Dave Peterson
  #3   Report Post  
Bob Phillips
 
Posts: n/a
Default

I wouldn't bother checking if it exist, just trash it and re-create it.

Sub myToolbar()
Dim oCB As Object
Dim oCtl As CommandBarControl
Dim newMenu As CommandBarControl
Dim ctrlButton As CommandBarControl

On Error Resume Next
Application.CommandBars("MyCB").Delete
On Error GoTo 0

Set oCB = Application.CommandBars.Add( _
Name:="MyCB", temporary:="True")

With oCB
With .Controls.Add(Type:=msoControlButton)
.Caption = "Button1"
.Style = msoButtonIcon
.FaceId = 29
.OnAction = "myMacro1"
End With
With .Controls.Add(Type:=msoControlButton)
.Caption = "Button2"
.Style = msoButtonIcon
.FaceId = 30
.OnAction = "myMacro2"
End With
.Visible = True
.Position = msoBarTop
End With

End Sub


--
HTH

Bob Phillips

"mike_mike" wrote in message
...
Hi

Is it possible to create a tool bar thru VB code? and check if it exists

for
that user, if it dosen't then create it. I want all users of a shared

spread
sheet to get the same toolbar. I don't want to over write the XLB file

below
as suggested below, in case it overwrites there current toolbar seetings..





Some one suggests



Menu and Toolbar customizations are stored in your *.XLB file.

Version 97 is username.xlb and found in C:\Windows folder.

Versions 2000 through 2003 are Excel9, Excel10 and Excel11.xlb and would

be
found in

Documents and Settings\yourname\application data\microsoft\Excel

One method is to send your *.XLB file to the other user and have that user
overwrite their own *.xlb with yours.

Another method is to Attach the Toolbar(ToolsCustomizeToolbars) to a

file
and send that file.


Gord Dibben Excel MVP

On Mon, 13 Jun 2005 14:52:03 -0700, "Tasha"


wrote:

I have my Excel toolbars just the way I like it and I was wondering if

there
was a way to share the toolbar with another user?





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
How to reset Excel 2000 toolbars to "factory defaults"? [email protected] Excel Discussion (Misc queries) 3 March 28th 05 10:39 PM
Saving Customized Toolbars in Excel 2003 MIKE MEDLIN Excel Discussion (Misc queries) 5 January 13th 05 02:03 AM
Customizing ToolBars MIKE MEDLIN Excel Discussion (Misc queries) 0 January 13th 05 12:11 AM
Excel 2002 custom toolbars fick Excel Discussion (Misc queries) 4 December 13th 04 09:51 PM
Cant add an icon to toolbars Rasoul Khoshravan Azar Excel Discussion (Misc queries) 1 November 28th 04 08:19 PM


All times are GMT +1. The time now is 01:55 AM.

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"