Results 1 to 2 of 2
  1. #1
    MRG123 is offline Novice
    Windows 10 Access 2016
    Join Date
    Oct 2019
    Posts
    2

    Access cannot run the callback function 'GetEnabled'

    Access is unable to locate my Sub 'GetEnabled'. I would like to have the button "bttnPAemail" disable unless the form rptPA is active. I cannot get Access to find the Sub 'GetEnabled'. I created a new module called 'ribbonXML' and stored the VBA below in it. Upon load, I get the callback error.



    Code:
    <button id="bttnPAemail" label="Email PA Report" onAction="oPAemail" imageMso="NewMailMessage"
    size="large" supertip="Print" getEnabled="GetEnabled"/>


    Code:
    Option Compare Database
    Public IRibbonControl As IRibbonUI
    
    Public Sub GetEnabled(ctl As IRibbonControl,ByRef Enabled)
        If Reports!rptPA.Visible =True Then
            Enabled =True
        Else
            Enabled =False
        End If
    End Sub


  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    A shot in the dark, but I believe it has to be a function rather than a sub
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

Please reply to this thread with any new information or opinions.

Similar Threads

  1. DLL with callback problem
    By nonlinearly in forum Programming
    Replies: 1
    Last Post: 05-28-2019, 10:51 AM
  2. Access 2010 Ribbon QAT Callback Error
    By Stephen in forum Access
    Replies: 4
    Last Post: 07-03-2018, 08:52 AM
  3. Replies: 2
    Last Post: 02-26-2017, 11:31 AM
  4. Access IIf function help
    By drz in forum Access
    Replies: 1
    Last Post: 11-04-2016, 01:29 PM
  5. Using the Nz function (Access 07)
    By jonny3000 in forum Access
    Replies: 5
    Last Post: 11-15-2012, 12:46 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums