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: 4,391
Default Problems loading and AddIn

One thing, Err is an Object with various properties etc
I think you are looking for
LastError = Err.Number

NickHK

"Trefor" wrote in message
...
Below is a snippet of my code thanks to this forum. I am getting an Error

=9
on the line marked *1, so I try and load the Addin, the below code

completes
without error, but the AddIn didnot load. This code has been working for
about 10months now, I can't understand why it is not working now, any

ideas?

Dim WBName As String
On Error Resume Next ' turn off error checking
*1 WBName = Workbooks(DCMaster2).Name ' Check to see if AddIn is

loaded
and should return an error if the file is not loaded
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
Application.DisplayAlerts = False
With AddIns.Add(Filename:=Application.UserLibraryPath & DCMaster2)
.Installed = True
End With

--
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
Automaion Addin not loading properly!! Abhijit Excel Programming 2 July 6th 05 12:03 PM
May be Automation AddIn loading problem!! Abhijit Excel Programming 0 June 6th 05 06:45 PM
addin loading issue howiefan Excel Discussion (Misc queries) 3 December 1st 04 11:10 PM
Run Macro when loading addin Mary[_7_] Excel Programming 3 September 7th 04 11:17 PM
Changing the Name of an Addin and loading worksheets off a network drive MikeCave[_2_] Excel Programming 0 June 4th 04 10:59 AM


All times are GMT +1. The time now is 12:43 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"