Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
referencing a different tab by referencing a list in the current s | Excel Worksheet Functions | |||
More referencing | Excel Worksheet Functions | |||
Please help with referencing! | Excel Programming | |||
Referencing | Excel Programming |