VBA program setup disk creation
VBA program setup disk creation
(OP)
I have developed a VBA program to work in AutoCAD 2000. How can I create a setup program to install the routine in AutoCAD with necessary button menus.
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS Come Join Us!Are you an
Engineering professional? Join Eng-Tips Forums!
*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail. Posting GuidelinesJobs |
VBA program setup disk creation
|
RE: VBA program setup disk creation
RE: VBA program setup disk creation
If that works you can add the neccesary menu's with some kind of auto_open macro in this add-in.
Hope this helps!
Jonathan
RE: VBA program setup disk creation
C:\Program Files\Microsoft Office\Office\XLStart
(or whatever your installation path is for Office)
would automatically be included when Excel started up. So all we did was copy the PERSONAL.XLS file, rename it (with the included macros) and created an .EXE file (using WinZip) that would install it in the proper path. I don't know if AutoCAD 2000 has a directory like this, but you might try to do some checking. You might be able adapt this solution to your own problem.
RE: VBA program setup disk creation
Let's say the name of the add-in file is 'MyAddin.xla' and the installer is called 'MyAddinInstall.xls'
In the 'ThisWorkbook' module of MyAddinInstall, write the following code:
Private Sub Workbook_Open()
FileToInstall = ThisWorkbook.Path + "\MyAddin.xla"
Set MyAddin = AddIns.Add(FileName:=FileToInstall, CopyFile:=True)
MyAddin.Installed = True
MsgBox ("The MyAddin Add-in is now installed." + Chr(10) + "Excel will now close." + Chr(10) + "The Add-in will now auto-load every time you start Excel." + Chr(10) + "Uninstall with Tools>Addins & deselect the MyAddin check-box.")
Application.Quit
End Sub
For this to work, both the installer AND the Addin must e in the same directory. Note that the addin will be copied to the addins folder only when the installer is on a removable medium, say a floppy. If both the files are on your hard drive, the add-in will be installed but will NOT be copied to the add-ins directory - it'll be accessed straight from its current location.
Hope this helps.