Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am using an .XLA in a common directory so multiple people on multiple
machines can all share the same VBA. Assuming at this point Tools Add-Ins does not have my Add-in listed. To make the adding of this automated for my users I have added the following with help from this discussion group: DCMaster2 = "'Customer Data Collect Master v6.38.xla'" MainPath = "M:\Work Flow" .. .. .. Function AddinPresent(MainPath, DCMaster2) As Boolean Dim WBName As String, lastError On Error Resume Next ' turn off error checking WBName = Workbooks(DCMaster2).Name lastError = Err On Error GoTo 0 ' restore error checking If lastError < 0 Then ' the add-in workbook isn't currently open. Manually open it. On Error Resume Next With AddIns.Add(Filename:=MainPath & "\" & DCMaster2) <---Point 1 .Installed = True End With lastError = Err On Error GoTo 0 ' restore error checking If lastError < 0 Then ' The workbook was not found in the correct location AddinPresent = False Else ' The workbook was found and installed AddinPresent = True End If Else AddinPresent = True End If End Function At Point 1 above I get a message: "Copy 'Customer Data Collect Master v6.38.xla' to the Addins folder for <user name" If I answer NO, it continues to work fine running from the macros in the common location. BUT it asks this question everytime you open the spreadsheet that contains the above code. If I answer YES, it copies the .XLA to "C:\Documents and Settings\<user name\Application Data\Microsoft\AddIns". The problem now is if I want to change/update the .XLA in the common location the end user will not get the updated file even though the above code looks for a particular, instead it will continue to use the "C:\Documents and Settings\<user name\Application Data\Microsoft\AddIns". I can manually go to Tools Add-Ins and deselect the ..XLA and then re-run the macro and it copies accross the updated .XLA, but this if harldy automated! Any ideas? -- Trefor |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
aauugghhh...#div/o problems & various average formula problems | Excel Worksheet Functions | |||
problems with? I don't know | Excel Discussion (Misc queries) | |||
RTD Problems | Excel Programming | |||
Problems merging an excel file due to code or file problems? | Excel Programming | |||
Two little problems | Excel Programming |