Excel add-in

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.
 
D

Dave Peterson

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"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top