speakers_86
Registered User.
- Local time
- Yesterday, 22:32
- Joined
- May 17, 2007
- Messages
- 1,919
I have a custom ribbon that works fine for me, but on the client's computer it only seems to partially work. Below is a snippet of code that toggles the visibility of all groups in the ribbon. It is just a fail safe that I put in a hidden form the end user doesn't really have access to. This code works for me, but does nothing for him, even though I know the code runs when the end user clicks the button. Does anyone see a reason for this? The code is not very efficient, since I invalidate the ribbon over and over. Could that be the cause? It is hard for me to test since I don't have direct access to the computer. I've even tried upgrading my version of access from 2007, to 2010, and to 2013, and see no change.
The visible sub just sets the boolean variable and invalidates. i is an integer that indicates which boolean to change and boo is the value to change it to. i=16 is a special case that toggles the visibility of the admin button.
Code:
If Me.Command0.Caption = "Show All" Then
Me.Command0.Caption = "Hide All"
ribbon.ShowAll True, True
Else
Me.Command0.Caption = "Show All"
ribbon.ShowAll False, True
End If
Code:
Public Sub ShowAll(boo As Boolean, Optional booChangeAdmin As Boolean = False)
On Error GoTo err
Dim i As enumGroupVisibility
For i = 0 To 25
If i = 16 Then
If booChangeAdmin Then
Visible i, boo
End If
Else
Visible i, boo, False
End If
Next
Exit Sub
err:
End Sub
The visible sub just sets the boolean variable and invalidates. i is an integer that indicates which boolean to change and boo is the value to change it to. i=16 is a special case that toggles the visibility of the admin button.