0
以我USysRibbons表我有這個RibbonXML低於有我想使用onload事件「BAMPEAMain_onLoad」MS訪問色帶的onload
當我打開數據庫,MsAcces顯示以下消息 來改變labelControl。 ..無法運行marco或回調函數'BAMPEAMain_onLoad。 確保宏或函數存在並採用正確的參數。
有什麼不對的BAMPEAMain_onLoad
Public Sub BAMPEAMain_onLoad(ribbon As IRibbonUI)
'
' Code for onLoad callback. Ribbon control customUI
MsgBox "Hello " '& dhGetUserName 'use the record dhGetUserName function to get the current user logged ID.
.
.
.
RibbonXML
<customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui" onLoad="BAMPEAMain_onLoad">
<ribbon startFromScratch="true">
<tabs>
<tab idMso="TabFile" visible="false" />
<tab idMso="TabHome" visible="false" />
<tab idMso="TabCreate" visible="false" />
<tab idMso="TabExternalData" visible="false" />
<tab idMso="TabDatabaseTools" visible="false" />
<tab idMso="TabSourceControl" visible="false" />
<tab idMso="TabAddIns" visible="true" />
<tab id="BAMPEA" label="BAMPEA" visible="true">
<group id="Connect" label="Connect" visible="true">
<comboBox id="SelectSites" label="Sites" visible="true" onChange="SelectSites_onChange"/>
<comboBox id="SelectDB" label="Select DB" visible="true" onChange="SelectDB_onChange"/>
<labelControl id="CurrentUserId" label="Bonjour ! - " visible="true"/>
<button id="ExitApp" imageMso="ShapeLightningBolt" label="Exit" visible="true" onAction="ExitApp_onAction"/>
<button id="BAMPEAHelp" imageMso="WorkflowPending" visible="true" onAction="BAMPEAHelp_onAction"/>
</group ></tab >
</tabs>
</ribbon>
<backstage>
<tab idMso="TabInfo" visible="true"/>
<button idMso="FileSave" visible="false"/>
<button idMso="SaveObjectAs" visible="false"/>
<button idMso="FileSaveAsCurrentFileFormat" visible="false"/>
<button idMso="FileOpen" visible="false"/>
<button idMso="FileCloseDatabase" visible="false"/>
<tab idMso="TabRecent" visible="false"/>
<tab idMso="TabNew" visible="false"/>
<tab idMso="TabPrint" visible="false"/>
<tab idMso="TabShare" visible="false"/>
<tab id="customTab" label="Custom Tab"/>
<tab idMso="TabHelp" visible="false"/>
<button idMso="ApplicationOptionsDialog" visible="false"/>
<button idMso="FileExit" visible="false"/>
</backstage>
</customUI>