Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Custom MS Excel xla add-in - Re-Start Issue 1

Status
Not open for further replies.

hafod

Technical User
Mar 14, 2005
73
GB
Hi,
I have created a Microsoft Excel xla add-in to provide portability of a GUI Interface developed using Excel' s VBA 'User Forms'. The problem is the form loads automatically when the workbook loads, however if the form is closed (unloaded)in current session there appears to be no means of reloading it unless the addIn is de-installed and then re-installed (Tools-Macros-Addins etc...). I can go the VBA editor and do this but the whole idea is to 'insulate novice users from this environment!. Can a plug in of this type be executed from a macro or a customised toolbar to avoid this problem?

Your help woyuld be much appreciated.
Hafod
 
FAQ tells you how to add in menu commands, if you use these on the following routines in your addin:
Code:
Sub Auto_Open()
  Call AddNewMenu
End Sub

Sub Auto_Close()
  Call DeleteMenu
End Sub
then you add a menu item when you load your addin. Change the code in the FAQ on the myMacro sub to launch your user form, i.e.
Code:
userform.show


Robert Cumming
 

If your form loads automatically when the Add-in is installed, something like this might work:

Code:
Sub RestoreForm()
    AddIns("your add-in name here").Installed = False
    AddIns("your add-in name here").Installed = True

End Sub

-Glenn
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top