Howdy,
Haven't posted in a while so I thought I'd drive someone crazy (hope not). My company recently moved into Office 2007 so I need a little assistance. I created my customized ribbon but I'm quite confused on how the callback works for getVisible or getEnabled. When I open the database the "Enter Observation" is disabled and the "Admin Options" is invisible every time!! Any help with what I'm missing would be great.
I only want this to check permissions when the user opens the db
<group id="grpAdmin" label="Admin Options" getVisible="CallbackGetVisible">
<menu id = "mnuadmin" label = "Admin Options">
I want to enable/disable controls based on the status of the entry
<menu id="mnuProjectsReports" label="Entry Options">
<button id="Button1" label="Enter Observation" imageMso="Paste" getEnabled="CallbackGetEnabled"
onAction="MacOpenEntryForm"/>
Option Compare Database
Option Explicit
Public bolEnabled As Boolean
Public bolVisible As Boolean
Sub CallbackGetEnabled(control As IRibbonControl, ByRef enabled)
bolEnabled = False
If Environ("USERNAME") = "myloginid" Then
bolEnabled = True
Else
enabled = True
End If
End Sub
Sub CallbackGetVisible(control As IRibbonControl, ByRef visible)
bolVisible = False
If Environ("USERNAME") = "myloginid" Then
bolVisible = True
Else
visible = True
End If
End Sub}
Any help would be wonderful!
Haven't posted in a while so I thought I'd drive someone crazy (hope not). My company recently moved into Office 2007 so I need a little assistance. I created my customized ribbon but I'm quite confused on how the callback works for getVisible or getEnabled. When I open the database the "Enter Observation" is disabled and the "Admin Options" is invisible every time!! Any help with what I'm missing would be great.
I only want this to check permissions when the user opens the db
<group id="grpAdmin" label="Admin Options" getVisible="CallbackGetVisible">
<menu id = "mnuadmin" label = "Admin Options">
I want to enable/disable controls based on the status of the entry
<menu id="mnuProjectsReports" label="Entry Options">
<button id="Button1" label="Enter Observation" imageMso="Paste" getEnabled="CallbackGetEnabled"
onAction="MacOpenEntryForm"/>
Option Compare Database
Option Explicit
Public bolEnabled As Boolean
Public bolVisible As Boolean
Sub CallbackGetEnabled(control As IRibbonControl, ByRef enabled)
bolEnabled = False
If Environ("USERNAME") = "myloginid" Then
bolEnabled = True
Else
enabled = True
End If
End Sub
Sub CallbackGetVisible(control As IRibbonControl, ByRef visible)
bolVisible = False
If Environ("USERNAME") = "myloginid" Then
bolVisible = True
Else
visible = True
End If
End Sub}
Any help would be wonderful!