Results 1 to 3 of 3

Thread: Installing VBA files

  1. #1

    Thread Starter
    Frenzied Member zaza's Avatar
    Join Date
    Apr 2001
    Location
    Borneo Rainforest Habits: Scratching
    Posts
    1,486

    Installing VBA files

    Evening all,

    My app uses templates programmed in VBA to add stuff to Office. I also have a VB.Net controller, which in addition is the main install package. My problem comes in that I need to put the templates in each user's Office Startup folder (I've tried the All Users startup folder - doesn't work), most of whom are not administrators, but they'll all need to be uninstalled should the administrator wish to do so .
    My current MO is the following:

    1) Templates copied to c:\Program Files\MyApp folder during install.
    2) When each user runs the main app, it checks to see if the files are in the Office\Startup folder. If not, copy them across.
    3) Add a file to the Common Files\MyApp folder (only location where all users can write) specifying file location (in case it is not always the same) of template.
    4) During Uninstall by admin, this Common Files\MyApp folder is checked, all users who have run the app are identified and the paths for the templates established, so that they can be deleted.
    5) Then take the admin to Add/Remove programs to uninstall the rest of it.


    This is a bit clunky, although it seems to work fine. The question is, is there an easier way, so that the templates can just be incorporated into the main install and likewise removed. I don't know a way of specifying the "Office\Startup" folder in a VB.Net setup project.


    Cheers

    zaza

  2. #2
    Lively Member JustinLabenne's Avatar
    Join Date
    Jul 2005
    Location
    Ohio
    Posts
    64

    Re: Installing VBA files

    If you can create an instance of Excel and access it's application properties that way:

    VB Code:
    1. Dim objExcelApp As Object
    2.  
    3.     Set objExcelApp = CreateObject("Excel.Application")
    4.  
    5.  
    6.     With objExcelApp
    7.         .Visible = True
    8.         MsgBox .StartupPath
    9.     End With
    10.  
    11.     Set objExcelApp = Nothing

    Just set the visible to False or cut it out, or I am sure you can probably come up with some way if you have already done all you have stated in your post.
    Justin Labenne
    www.jlxl.net

  3. #3

    Thread Starter
    Frenzied Member zaza's Avatar
    Join Date
    Apr 2001
    Location
    Borneo Rainforest Habits: Scratching
    Posts
    1,486

    Re: Installing VBA files

    Thanks, but I think you may have the wrong end of the stick. I can already identify the startup folders for the various users and put the templates in there - at the moment I do this when each user runs the app for the first time and store a log of the users. What I'd like to do is put the templates in the startup folders at install, so that the uninstall process takes care of getting rid of them and I don't have to do the more complicated uninstall process that I'm doing at the moment.

    Cheers

    zaza

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width