running a macro from an add-in

后端 未结 5 841
挽巷
挽巷 2020-12-09 22:15

i have an add-in called book1. inside the addin there is a module called module1 which has a sub called addin1

i would like to run the macro addin1 from a different

5条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-09 22:31

    In your workbook you write:

    Sub test() 
        ' from other excel file
        Application.Run ("youraddin.xla!ShowForm") 
    End Sub
    

    And in the addin you have

    Public Sub ShowForm() 
        loginform.Show 
    End Sub 
    

提交回复
热议问题