Excel add-in

  • Thread starter Thread starter Tina
  • Start date Start date
T

Tina

Hi I have converted the Modules and Forms of an xls file to an xla.
Now in the "ThisWorkbook" code of the xls file, I can call the
functions but not the forms. For exmaple a simle frmSetup.Show will
give me an error of "variable not defined". I have added the
reference to the xla file so I'm not sure why this is happening. If
anyone has idea what I need to do, it is very much appreciated.
Thanks.
 
I think...

Create a new subroutine in the addin that shows the form.

Option Explicit
Sub ShowSetup()
frmSetup.show
End Sub

Then you can call that routine by:

'with the reference
call ShowSetup

or without the reference:
dim myAddin as workbook
application.run "'" & myaddin.name & "'!showsetup"
 
Back
Top