×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

VBA program setup disk creation

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.

RE: VBA program setup disk creation

As far as I know, VBA does not support making stand alone applications or Set-up disks. You are going to need VB instead of VBA to be able to do this.

RE: VBA program setup disk creation

I don't know for sure but all office applications support VBA as add-ins maybe Autocad can do that to...

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

I ran into a situation like this with my own project. The problem was that the only previous way to get macros installed was to manually import it from a file (what are the odds regular users can do this?). After some snooping, I found out that any file located in the directory:

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

I'll outline how I make a installer for an Excel Add-in - this might give you ideas for your own problem:

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.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources