Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Referencing an add-in in VBA

We have an Excel 2002 worksheet that is using the Internet Assistant VBA
add-in. We make
a reference to this add-in in VBA and use this to save certain ranges of the
workbook as HTML
files.

The issue that pops up is if someone opens this workbook and they don't have
this add-in loaded
(i.e. the box is checked in the add-ins dialog box), they'll get a compile
error. We tried using
code to in VBA to install the add-in (Addins.Add...), but since the error
comes up when the
workbook is first loaded, this code doesn't get a chance to run (we have it
in the procedure that is
writing out the HTML).

Is there a way to do a type of late-binding to reference an add-in in Excel
2002?

Thanks


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 638
Default Referencing an add-in in VBA

In the Workbook_Open event, before anything else, you could check to
see if the AddIn is installed. I'm assuming that everyone using this
workbook has the add-in on their PC, but it might not be "installed"
in Excel. You could do something like this to ensure that it is
installed.
On Error Resume Next
If AddIns("AddInName.xla").Installed = False Then _
AddIns("AddInName.xla").Installed = True

If you need to actually add the add-in to Excel list of Add-Ins, you
could do something like:
AddIns.Add FileName:="C:\AddInFolder\AddInName.xla", _
CopyFile:=True

Or, you could modify your code to use the first code I gave to see if
the Add-In is installed wherever you need to. For example:
If AddIns("AddInName.xla").Installed < False Then
Your Code Here
End If

HTH
Nobody wrote:
We have an Excel 2002 worksheet that is using the Internet Assistant VBA
add-in. We make
a reference to this add-in in VBA and use this to save certain ranges of the
workbook as HTML
files.

The issue that pops up is if someone opens this workbook and they don't have
this add-in loaded
(i.e. the box is checked in the add-ins dialog box), they'll get a compile
error. We tried using
code to in VBA to install the add-in (Addins.Add...), but since the error
comes up when the
workbook is first loaded, this code doesn't get a chance to run (we have it
in the procedure that is
writing out the HTML).

Is there a way to do a type of late-binding to reference an add-in in Excel
2002?

Thanks


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Referencing an add-in in VBA

Thanks, I'll give it a try.

"JW" wrote in message
oups.com...
In the Workbook_Open event, before anything else, you could check to
see if the AddIn is installed. I'm assuming that everyone using this
workbook has the add-in on their PC, but it might not be "installed"
in Excel. You could do something like this to ensure that it is
installed.
On Error Resume Next
If AddIns("AddInName.xla").Installed = False Then _
AddIns("AddInName.xla").Installed = True

If you need to actually add the add-in to Excel list of Add-Ins, you
could do something like:
AddIns.Add FileName:="C:\AddInFolder\AddInName.xla", _
CopyFile:=True

Or, you could modify your code to use the first code I gave to see if
the Add-In is installed wherever you need to. For example:
If AddIns("AddInName.xla").Installed < False Then
Your Code Here
End If

HTH
Nobody wrote:
We have an Excel 2002 worksheet that is using the Internet Assistant VBA
add-in. We make
a reference to this add-in in VBA and use this to save certain ranges of
the
workbook as HTML
files.

The issue that pops up is if someone opens this workbook and they don't
have
this add-in loaded
(i.e. the box is checked in the add-ins dialog box), they'll get a
compile
error. We tried using
code to in VBA to install the add-in (Addins.Add...), but since the error
comes up when the
workbook is first loaded, this code doesn't get a chance to run (we have
it
in the procedure that is
writing out the HTML).

Is there a way to do a type of late-binding to reference an add-in in
Excel
2002?

Thanks




Reply
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
referencing a different tab by referencing a list in the current s Kevin Excel Worksheet Functions 3 July 6th 07 07:57 PM
More referencing splat Excel Worksheet Functions 0 June 8th 07 05:37 PM
Please help with referencing! D[_4_] Excel Programming 1 September 15th 04 07:54 PM
Referencing Frank Kabel Excel Programming 4 August 14th 04 01:05 AM


All times are GMT +1. The time now is 02:35 AM.

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

About Us

"It's about Microsoft Excel"