Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
mike_mike
 
Posts: n/a
Default Toobar question - how 2 get other user to see same toolbar

Hi

I have a shared spreadsheet that is used by a number of users. I want to
update the spreadsheet and add a new button to the toolbar SO THAT THEY ALL
SEE IT.

My question is ..How do you get the other users to get the new modified
toolbar without going around to each users desktop and changing it.

I can update the spreadsheet - ie set it to unshared, temporarily to make
changes

mike (oz)


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

I would create the toolbar when the workbook opens and delete it when the
workbook closes.

Here's how I do it:
http://groups.google.co.uk/groups?th...5B41%40msn.com

If you want to add items to the worksheet menu bar, you can use John
Walkenbach's menumaker:
http://j-walk.com/ss/excel/tips/tip53.htm

mike_mike wrote:

Hi

I have a shared spreadsheet that is used by a number of users. I want to
update the spreadsheet and add a new button to the toolbar SO THAT THEY ALL
SEE IT.

My question is ..How do you get the other users to get the new modified
toolbar without going around to each users desktop and changing it.

I can update the spreadsheet - ie set it to unshared, temporarily to make
changes

mike (oz)


--

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

Thanks muchly you are a legend!

I have modified the procedure to add a button, only if it dosen't exist on a
tool bar.

Sub add_menubar_buttons(stoolbar As String)

Dim i As Long

Dim mac_names As Variant
Dim cap_names As Variant
Dim tip_text As Variant

On Error GoTo Err_han

' buttons to add

mac_names = Array("mac1", _
"mac2", _
"mac3")


cap_names = Array("caption 1", _
"caption 2", _
"caption 3")


tip_text = Array("tip 1", _
"tip 2", _
"tip 3")

With Application.CommandBars(stoolbar)


For i = LBound(mac_names) To UBound(mac_names)
Dim j As Integer
' Search for a button with same tool text,
' If button not exists then create button.
' Note : buttons don't seem to have a name property
' you could also search on the tag field, or onAction.
Dim bfound As Boolean
bfound = False
For j = 1 To .Controls.Count
If .Controls(j).TooltipText = tip_text(i) Then
bfound = True ' button already exists
Exit For
End If
Next j
If bfound = False Then ' add button to end
With .Controls.Add(Type:=msoControlButton)
.OnAction = ThisWorkbook.Name & "!" & mac_names(i)
.Caption = cap_names(i)
.Style = msoButtonIconAndCaption
.FaceId = 71 + i
.TooltipText = tip_text(i)
.Tag = tip_text(i)
End With
End If

Next i
End With

Exit Sub
Err_han:
If Err.Number = 5 Then
MsgBox "Toolbar " & stoolbar & " does not exist."
Exit Sub
End If
MsgBox Err.Number
MsgBox Err.Description
End Sub


"Dave Peterson" wrote:

I would create the toolbar when the workbook opens and delete it when the
workbook closes.

Here's how I do it:
http://groups.google.co.uk/groups?th...5B41%40msn.com

If you want to add items to the worksheet menu bar, you can use John
Walkenbach's menumaker:
http://j-walk.com/ss/excel/tips/tip53.htm

mike_mike wrote:

Hi

I have a shared spreadsheet that is used by a number of users. I want to
update the spreadsheet and add a new button to the toolbar SO THAT THEY ALL
SEE IT.

My question is ..How do you get the other users to get the new modified
toolbar without going around to each users desktop and changing it.

I can update the spreadsheet - ie set it to unshared, temporarily to make
changes

mike (oz)


--

Dave Peterson

  #4   Report Post  
mike_mike
 
Posts: n/a
Default

Thanks muchly!

This proc adds a button..if not exists

Sub add_menubar_buttons(stoolbar As String)

Dim i As Long

Dim mac_names As Variant
Dim cap_names As Variant
Dim tip_text As Variant

On Error GoTo Err_han

' buttons to add

mac_names = Array("mac1", _
"mac2", _
"mac3")


cap_names = Array("caption 1", _
"caption 2", _
"caption 3")


tip_text = Array("tip 1", _
"tip 2", _
"tip 3")

With Application.CommandBars(stoolbar)


For i = LBound(mac_names) To UBound(mac_names)
Dim j As Integer
' Search for a button with same tool text,
' If button not exists then create button.
' Note : buttons don't seem to have a name property
' you could also search on the tag field, or onAction.
Dim bfound As Boolean
bfound = False
For j = 1 To .Controls.Count
If .Controls(j).TooltipText = tip_text(i) Then
bfound = True ' button already exists
Exit For
End If
Next j
If bfound = False Then ' add button to end
With .Controls.Add(Type:=msoControlButton)
.OnAction = ThisWorkbook.Name & "!" & mac_names(i)
.Caption = cap_names(i)
.Style = msoButtonIconAndCaption
.FaceId = 71 + i
.TooltipText = tip_text(i)
.Tag = tip_text(i)
End With
End If

Next i
End With

Exit Sub
Err_han:
If Err.Number = 5 Then
MsgBox "Toolbar " & stoolbar & " does not exist."
Exit Sub
End If
MsgBox Err.Number
MsgBox Err.Description
End Sub

"Dave Peterson" wrote:

I would create the toolbar when the workbook opens and delete it when the
workbook closes.

Here's how I do it:
http://groups.google.co.uk/groups?th...5B41%40msn.com

If you want to add items to the worksheet menu bar, you can use John
Walkenbach's menumaker:
http://j-walk.com/ss/excel/tips/tip53.htm

mike_mike wrote:

Hi

I have a shared spreadsheet that is used by a number of users. I want to
update the spreadsheet and add a new button to the toolbar SO THAT THEY ALL
SEE IT.

My question is ..How do you get the other users to get the new modified
toolbar without going around to each users desktop and changing it.

I can update the spreadsheet - ie set it to unshared, temporarily to make
changes

mike (oz)


--

Dave Peterson

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
Cells User Select Locked after upgrade to Excel 2002 TWilson Excel Discussion (Misc queries) 1 August 5th 05 12:22 PM
User forms "back" buttons DavidObeid Excel Discussion (Misc queries) 1 June 22nd 05 09:07 AM
Finding a record based on user input Soundman Excel Discussion (Misc queries) 5 June 21st 05 03:06 AM
new user with easy question? not easy for me speakeztruth New Users to Excel 5 June 3rd 05 09:40 PM
user input question BLW Excel Discussion (Misc queries) 2 May 23rd 05 08:41 PM


All times are GMT +1. The time now is 02:43 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"