S
Syvers
Hi, I am just trying to understand why when I have a table in my database
called Ribbons and run the following code at startup (via autoexec) the
ribbon is gone, which is good
Public Function LoadRibbons()
Dim RS As Recordset
Set RS = CurrentProject.Connection.Execute("SELECT Ribbons.RibbonName,
Ribbons.RibbonXML FROM RIBBONS")
If Not RS.BOF Then
Application.LoadCustomUI RS("RibbonName").Value, RS("RibbonXml").Value
End If
RS.Close
Set RS = Nothing
End Function
but if i dont want to store the xml in a table where a clever person might
change it but want it in a module it just loads the ribbon into the list of
available ribbons rather than opening with my ribbon being on display as per
the above metho, again i call this in autoexec
Function CreateRibbon()
Dim xml As String
xml = _
"<customUI xmlns=""http://schemas.microsoft.com/office/2006/01/customui"">"
& vbCrLf & _
" <ribbon startFromScratch=""true"">" & vbCrLf & _
" <officeMenu>" & vbCrLf & _
" <button idMso=""FileCompactAndRepairDatabase"" visible=""false""/>" &
vbCrLf & _
" <button idMso=""FileOpenDatabase"" visible=""false""/>" & vbCrLf & _
" <button idMso=""FileNewDatabase"" visible=""false""/>" & vbCrLf & _
" <splitButton idMso=""FileSaveAsMenuAccess"" visible=""false""/>" & vbCrLf
& _
" </officeMenu>" & vbCrLf & _
" </ribbon>" & vbCrLf & _
"</customUI>"
Application.LoadCustomUI "BlankRibbon", xml
End Function
I dont see what the actual diffference is here and when this is ditributed
to clients I dont want them choosing their ribbons or having access to the
table. Also, as this is being done as an ADP with a SQL backend if the user
isnt connected to the database until they decide which one (on opening) then
I cant use the table method anyway.
If this is in the wrong forum please let me know where it is meant to be.
Thanks
PAul
called Ribbons and run the following code at startup (via autoexec) the
ribbon is gone, which is good
Public Function LoadRibbons()
Dim RS As Recordset
Set RS = CurrentProject.Connection.Execute("SELECT Ribbons.RibbonName,
Ribbons.RibbonXML FROM RIBBONS")
If Not RS.BOF Then
Application.LoadCustomUI RS("RibbonName").Value, RS("RibbonXml").Value
End If
RS.Close
Set RS = Nothing
End Function
but if i dont want to store the xml in a table where a clever person might
change it but want it in a module it just loads the ribbon into the list of
available ribbons rather than opening with my ribbon being on display as per
the above metho, again i call this in autoexec
Function CreateRibbon()
Dim xml As String
xml = _
"<customUI xmlns=""http://schemas.microsoft.com/office/2006/01/customui"">"
& vbCrLf & _
" <ribbon startFromScratch=""true"">" & vbCrLf & _
" <officeMenu>" & vbCrLf & _
" <button idMso=""FileCompactAndRepairDatabase"" visible=""false""/>" &
vbCrLf & _
" <button idMso=""FileOpenDatabase"" visible=""false""/>" & vbCrLf & _
" <button idMso=""FileNewDatabase"" visible=""false""/>" & vbCrLf & _
" <splitButton idMso=""FileSaveAsMenuAccess"" visible=""false""/>" & vbCrLf
& _
" </officeMenu>" & vbCrLf & _
" </ribbon>" & vbCrLf & _
"</customUI>"
Application.LoadCustomUI "BlankRibbon", xml
End Function
I dont see what the actual diffference is here and when this is ditributed
to clients I dont want them choosing their ribbons or having access to the
table. Also, as this is being done as an ADP with a SQL backend if the user
isnt connected to the database until they decide which one (on opening) then
I cant use the table method anyway.
If this is in the wrong forum please let me know where it is meant to be.
Thanks
PAul