Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Remove reference from code
My VBA project has a reference to an xla - lets call it external.xla. Not all
users of my VBA project has this xla installed. Is there any way to check the existence of the xla from my code when the VBA project is opened. If it exist it is placed in the folder C:\xlaStore. If the xla does not exist I would like to remove the reference or perhaps just ignore it in some way. Thanks The Doctor |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Remove reference from code
Private Sub Workbook_Open()
if dir("C:\xlaStore\external.xla") = "" then - xla does not exist End if End Sub -- Regards, Tom Ogilvy "Dr.Schwartz" wrote in message ... My VBA project has a reference to an xla - lets call it external.xla. Not all users of my VBA project has this xla installed. Is there any way to check the existence of the xla from my code when the VBA project is opened. If it exist it is placed in the folder C:\xlaStore. If the xla does not exist I would like to remove the reference or perhaps just ignore it in some way. Thanks The Doctor |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Remove reference from code
Thanks Tom, however I still need the part that removes the reference
The Doctor "Tom Ogilvy" wrote: Private Sub Workbook_Open() if dir("C:\xlaStore\external.xla") = "" then - xla does not exist End if End Sub -- Regards, Tom Ogilvy "Dr.Schwartz" wrote in message ... My VBA project has a reference to an xla - lets call it external.xla. Not all users of my VBA project has this xla installed. Is there any way to check the existence of the xla from my code when the VBA project is opened. If it exist it is placed in the folder C:\xlaStore. If the xla does not exist I would like to remove the reference or perhaps just ignore it in some way. Thanks The Doctor |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Remove reference from code
http://support.microsoft.com/default...29&Product=xlw
XL2000: How to Programmatically Create a Reference shows how to both add and remove a reference. -- Regards, Tom Ogilvy "Dr.Schwartz" wrote in message ... Thanks Tom, however I still need the part that removes the reference The Doctor "Tom Ogilvy" wrote: Private Sub Workbook_Open() if dir("C:\xlaStore\external.xla") = "" then - xla does not exist End if End Sub -- Regards, Tom Ogilvy "Dr.Schwartz" wrote in message ... My VBA project has a reference to an xla - lets call it external.xla. Not all users of my VBA project has this xla installed. Is there any way to check the existence of the xla from my code when the VBA project is opened. If it exist it is placed in the folder C:\xlaStore. If the xla does not exist I would like to remove the reference or perhaps just ignore it in some way. Thanks The Doctor |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Remove reference names | Excel Programming | |||
Add Remove DLL reference in VB | Excel Programming | |||
remove reference via code | Excel Programming | |||
Use VB code to remove code in sheet1 | Excel Programming | |||
Remove a reference | Excel Programming |