Hi,
I am struggling with the following:
I have made two different application where i have used the same coding for having a dynamic customized ribbon. In both cases, the same procedure:
1. UsysRibbons table with ribbon code containing onLoad="onLoad" (same naming worked in both instances)
2. vba module with the following code:
3. defining global variable to catch ribbon
4. set a startup form for the application with onLoad and onClose event having globIR.Invalidate
This coding simply does not work in the third application though i have restarted my computer several times to restart access.
Upon starting the application before startup form loads run time error 91 appears. Clicking end program runs on correctly the customized ribbon function as designed.It seems to me that for some reason the startup form loads earlier than the global variable is set. I have check the perivous application what can be different but found no clue. Any idea?
thanks
Andrew
I am struggling with the following:
I have made two different application where i have used the same coding for having a dynamic customized ribbon. In both cases, the same procedure:
1. UsysRibbons table with ribbon code containing onLoad="onLoad" (same naming worked in both instances)
2. vba module with the following code:
Code:
Public sub onLoad(Ribbon as IRibbonUI)
set globIR=Ribbon
End sub
3. defining global variable to catch ribbon
Code:
Publis globIR as IRibbonUI
4. set a startup form for the application with onLoad and onClose event having globIR.Invalidate
This coding simply does not work in the third application though i have restarted my computer several times to restart access.
Upon starting the application before startup form loads run time error 91 appears. Clicking end program runs on correctly the customized ribbon function as designed.It seems to me that for some reason the startup form loads earlier than the global variable is set. I have check the perivous application what can be different but found no clue. Any idea?
thanks
Andrew