ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Ignoring reference errors (https://www.excelbanter.com/excel-programming/348241-ignoring-reference-errors.html)

Mike Jerakis

Ignoring reference errors
 
I have a file that on my machine I need it to do things in VBA with other
add-ins. To use those add-ins in Excel, you must create a reference to the
..XLA and then there is VBA code to take advantage of the add-in.

I would like to send this file as a whole to do someone else and not have
library reference errors. There is VBA code with references to this library
spread throughout the various modules. So when a user without this one
library tries to open the file, the VB tries to compile and cannot correctly
do so and therefore renders all the VBA code useless.

Is there a way to get the file to open with regard to these library
problems? And let the rest of the VBA needs get used?

Jim Rech

Ignoring reference errors
 
I think you have to make a different version of your workbook, one with the
references removed and all code calling referenced routines removed or
commented out or put inside conditional compilation directives.

--
Jim
"Mike Jerakis" <Mike wrote in message
...
|I have a file that on my machine I need it to do things in VBA with other
| add-ins. To use those add-ins in Excel, you must create a reference to
the
| .XLA and then there is VBA code to take advantage of the add-in.
|
| I would like to send this file as a whole to do someone else and not have
| library reference errors. There is VBA code with references to this
library
| spread throughout the various modules. So when a user without this one
| library tries to open the file, the VB tries to compile and cannot
correctly
| do so and therefore renders all the VBA code useless.
|
| Is there a way to get the file to open with regard to these library
| problems? And let the rest of the VBA needs get used?



Mike Jerakis[_2_]

Ignoring reference errors
 
Specifically, where do I find out how to create "conditional compilation
directives?" In the VBA help there is only 1 very short page on it. Is
there better info, somewhere else?

"Jim Rech" wrote:

I think you have to make a different version of your workbook, one with the
references removed and all code calling referenced routines removed or
commented out or put inside conditional compilation directives.

--
Jim
"Mike Jerakis" <Mike wrote in message
...
|I have a file that on my machine I need it to do things in VBA with other
| add-ins. To use those add-ins in Excel, you must create a reference to
the
| .XLA and then there is VBA code to take advantage of the add-in.
|
| I would like to send this file as a whole to do someone else and not have
| library reference errors. There is VBA code with references to this
library
| spread throughout the various modules. So when a user without this one
| library tries to open the file, the VB tries to compile and cannot
correctly
| do so and therefore renders all the VBA code useless.
|
| Is there a way to get the file to open with regard to these library
| problems? And let the rest of the VBA needs get used?




Mike Jerakis[_2_]

Ignoring reference errors
 
Is there a way to also add a reference to an add-in within conditional
compiliation? Specifically is there a way to make this reference in code only
and not through the VBE interface. So that with a flick of variable I can
decide whether to use an add-in or let the spreadsheet model work without it
entirely? Examples are greatly appreciated. This would solve so many of my
problems when sending files to people. Thanks.

"Mike Jerakis" wrote:

Specifically, where do I find out how to create "conditional compilation
directives?" In the VBA help there is only 1 very short page on it. Is
there better info, somewhere else?

"Jim Rech" wrote:

I think you have to make a different version of your workbook, one with the
references removed and all code calling referenced routines removed or
commented out or put inside conditional compilation directives.

--
Jim
"Mike Jerakis" <Mike wrote in message
...
|I have a file that on my machine I need it to do things in VBA with other
| add-ins. To use those add-ins in Excel, you must create a reference to
the
| .XLA and then there is VBA code to take advantage of the add-in.
|
| I would like to send this file as a whole to do someone else and not have
| library reference errors. There is VBA code with references to this
library
| spread throughout the various modules. So when a user without this one
| library tries to open the file, the VB tries to compile and cannot
correctly
| do so and therefore renders all the VBA code useless.
|
| Is there a way to get the file to open with regard to these library
| problems? And let the rest of the VBA needs get used?





All times are GMT +1. The time now is 05:31 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com