Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Saving Addin
I've created a workbook that has several macros which are linked to excel menu items. I am trying to programatically save this workbook as an addin to my xlStart folder. However, the bit of code that I'm using doesn't seem to be working correctly (or at least how I thought it would). What I thought would happen is that this addin would open up in the background. However, everytime I open up Excel, the workbook opens up. Is this because it is saving as an Excel workbook and not an addin? Any ideas? Application.DisplayAlerts = False fName = "C:\Program Files\Microsoft Office\Office\XLStart\Custom.xla" Call ActiveWorkbook.SaveAs(fName, xlAddIn) Application.Quit -- Rutgers_Excels ------------------------------------------------------------------------ Rutgers_Excels's Profile: http://www.excelforum.com/member.php...fo&userid=8973 View this thread: http://www.excelforum.com/showthread...hreadid=560065 |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Saving Addin
I'd use something like:
Option Explicit Sub testme() Dim fName As String fName = Application.StartupPath & "\" & "custom.xla" With ThisWorkbook .IsAddin = True Application.DisplayAlerts = False .SaveAs Filename:=fName Application.DisplayAlerts = True End With End Sub Don't store the .xls in that XLStart folder, either. Rutgers_Excels wrote: I've created a workbook that has several macros which are linked to excel menu items. I am trying to programatically save this workbook as an addin to my xlStart folder. However, the bit of code that I'm using doesn't seem to be working correctly (or at least how I thought it would). What I thought would happen is that this addin would open up in the background. However, everytime I open up Excel, the workbook opens up. Is this because it is saving as an Excel workbook and not an addin? Any ideas? Application.DisplayAlerts = False fName = "C:\Program Files\Microsoft Office\Office\XLStart\Custom.xla" Call ActiveWorkbook.SaveAs(fName, xlAddIn) Application.Quit -- Rutgers_Excels ------------------------------------------------------------------------ Rutgers_Excels's Profile: http://www.excelforum.com/member.php...fo&userid=8973 View this thread: http://www.excelforum.com/showthread...hreadid=560065 -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
addin workbook | Excel Discussion (Misc queries) | |||
AddIn not working right | Excel Discussion (Misc queries) | |||
What is an addin (in Excel) and how can we create one? | Excel Discussion (Misc queries) | |||
How do I stop Excel 2000 from saving file history from file that . | Excel Discussion (Misc queries) | |||
Backup in Saving a file in Excel 2002 | Excel Discussion (Misc queries) |