Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I'm trying to write code to save an activeworkbook as an
addin and then install the addin just saved. Can anyone help me with this? Thanks, Matt |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Something like
Sub SaveAddIn() Dim MyName As String, Shortname As String, MyPAth As String Dim MyAddIn as String, xlAddIn as AddIn Application.DisplayAlerts = False With ThisWorkbook MyName=.Name Shortname=replace(MyName,".xls","") MyAddin=Shortname & ".xla" 'Save as Add in MyPAth = .Path & "\" .IsAddin = True .SaveAs Filename:=MyPAth & MyAddIn, FileFormat:=xlAddIn 'Save as Workbook again otherwise you won't be able to see the sheets .IsAddin = False .SaveAs MyPAth & Shortname & ".xls", addtoMRU:=True End With On Error resume next 'De Install it Application.Addins(MyaddIn).Installed=false 'Re Install it Set xlAddIn=Application.Addins.Add (Mypath & MyAddIn,true) xlAddIn.Installed=true On error goto 0 Application.DisplayAlerts = True End Sub -----Original Message----- I'm trying to write code to save an activeworkbook as an addin and then install the addin just saved. Can anyone help me with this? Thanks, Matt . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
After Excel 2007 install, cannot save files on network share | Excel Discussion (Misc queries) | |||
Install Addin in Excel | Excel Programming | |||
Excel Save pops up when unloading Addin file | Excel Programming | |||
save file as addin programatically | Excel Programming | |||
Cannot install Excel 2002 Analysis Addin Toolpak | Excel Programming |