LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 201
Default Problems using Add-in

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
aauugghhh...#div/o problems & various average formula problems acbel40 Excel Worksheet Functions 5 October 19th 09 05:00 PM
problems with? I don't know cliffhanger79 Excel Discussion (Misc queries) 1 November 4th 05 01:47 PM
RTD Problems Jonathan Pinnock Excel Programming 0 October 8th 04 09:43 AM
Problems merging an excel file due to code or file problems? Cindy M -WordMVP- Excel Programming 0 September 14th 04 02:58 PM
Two little problems Robert Couchman[_6_] Excel Programming 2 August 12th 04 02:49 PM


All times are GMT +1. The time now is 11:07 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"