Opening a userform RRS feed

  • Question

  • I wonder if this can even be done. I have a main application Workbook (apps.xlsm) that has a few Userforms, most of the code is in another separate Workbook (code.xlam). It works great, but I have been given a challenge. The main application workbook HAS to be saved in old format XLS, which removes my customXML and Ribbon menu. So I transfer that to the XLAM; no problems for the most part. When I want to open a form that is in the main application workbook it cannot.

    Any ideas as to how can I access forms or code from the ADDIN into the main application workbook?

    The addin has its own forms and I can access them easily from the main application workbook but not the other way around. Wonder if someone has resolved this issue

    Gustavo Miller

    Tuesday, December 1, 2015 8:01 PM

All replies

  • Have the code to open the form in a module in the workbook (the one that has to be saved in XLS format) and call if from your ribbon callback using code such as

    'Callback for customButton4 onAction
    Sub ManageViolations(control As IRibbonControl)
    Application.Run "'" & Application.ActiveWorkbook.Name & "'!Violations"
    End Sub

    Doug Robbins - Word MVP dkr[atsymbol]mvps[dot]org

    Sunday, December 6, 2015 8:55 AM