ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Using a function from a vba add-in: is that considered an external link (https://www.excelbanter.com/excel-programming/297387-using-function-vba-add-considered-external-link.html)

Bura Tino

Using a function from a vba add-in: is that considered an external link
 
Hi,

If I use a function defined in a vba add-in, is that considered to be a link
to another workbook? If so, if I use the spreadsheet on another computer
with the add-in in another directory, how can I make excel look for this
function among currently installed add-ins rather than look for the same xla
workbook in the same location?

Thanks.

Bura



Bob Phillips[_6_]

Using a function from a vba add-in: is that considered an external link
 
Bura,

If you have installed add-ins, set a reference to the add-in in the VBE
(ToolsReference), and then you can use its functions as if it were local.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Bura Tino" wrote in message
news:pgdmc.36726$0H1.3179676@attbi_s54...
Hi,

If I use a function defined in a vba add-in, is that considered to be a

link
to another workbook? If so, if I use the spreadsheet on another computer
with the add-in in another directory, how can I make excel look for this
function among currently installed add-ins rather than look for the same

xla
workbook in the same location?

Thanks.

Bura





Bura Tino

Using a function from a vba add-in: is that considered an external link
 

"Bob Phillips" wrote in message
...
Bura,

If you have installed add-ins, set a reference to the add-in in the VBE
(ToolsReference), and then you can use its functions as if it were local.

--

HTH


I think you are talking about using the function in VBA. My question
pertains to using the function in the worksheet.

Bura

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Bura Tino" wrote in message
news:pgdmc.36726$0H1.3179676@attbi_s54...
Hi,

If I use a function defined in a vba add-in, is that considered to be a

link
to another workbook? If so, if I use the spreadsheet on another computer
with the add-in in another directory, how can I make excel look for this
function among currently installed add-ins rather than look for the same

xla
workbook in the same location?

Thanks.

Bura







Bob Phillips[_6_]

Using a function from a vba add-in: is that considered an external link
 
Bura,

You are correct, as you had posted to the programming group I did assume
that you were referring to the VBE.

If you mean worksheet, then you don't need a file identifier, you can call
it directly if it is installed.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Bura Tino" wrote in message
news:Hbkmc.37508$0H1.3454762@attbi_s54...

"Bob Phillips" wrote in message
...
Bura,

If you have installed add-ins, set a reference to the add-in in the VBE
(ToolsReference), and then you can use its functions as if it were

local.

--

HTH


I think you are talking about using the function in VBA. My question
pertains to using the function in the worksheet.

Bura

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Bura Tino" wrote in message
news:pgdmc.36726$0H1.3179676@attbi_s54...
Hi,

If I use a function defined in a vba add-in, is that considered to be

a
link
to another workbook? If so, if I use the spreadsheet on another

computer
with the add-in in another directory, how can I make excel look for

this
function among currently installed add-ins rather than look for the

same
xla
workbook in the same location?

Thanks.

Bura









Bura Tino

Using a function from a vba add-in: is that considered an external link
 

"Bob Phillips" wrote in message
...
Bura,

You are correct, as you had posted to the programming group I did assume
that you were referring to the VBE.

If you mean worksheet, then you don't need a file identifier, you can call
it directly if it is installed.


And this is what doesn't work for me. If I call it directly if it is
installed it works for me. But if I send the workbook to a colleague and
they also have it installed (but perhaps in a different place), then all
references to the function become qualfied like so:

'C:\PathToWhereIKeepIt\MyAddin.xla'!MyFunction()

and it no longer works. This is a problem that I also described in a post
with a different subject line.

This has become a problem which rendered the add-in that I have been
developing for a month completely useless! I would be very happy if anyone
can help!

Bura
--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Bura Tino" wrote in message
news:Hbkmc.37508$0H1.3454762@attbi_s54...

"Bob Phillips" wrote in message
...
Bura,

If you have installed add-ins, set a reference to the add-in in the

VBE
(ToolsReference), and then you can use its functions as if it were

local.

--

HTH


I think you are talking about using the function in VBA. My question
pertains to using the function in the worksheet.

Bura

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Bura Tino" wrote in message
news:pgdmc.36726$0H1.3179676@attbi_s54...
Hi,

If I use a function defined in a vba add-in, is that considered to

be
a
link
to another workbook? If so, if I use the spreadsheet on another

computer
with the add-in in another directory, how can I make excel look for

this
function among currently installed add-ins rather than look for the

same
xla
workbook in the same location?

Thanks.

Bura











Charles Williams

Using a function from a vba add-in: is that considered an external link
 
Hi Bura,

Yes it is considered an external link.

Two solutions a
- always install the addin in the same place (use an install package to make
sure)
- change links in the workbook (either manually or make your addin check
each workbook that is opened for links to itself and change them to itself)

You can download my auto-reversioning addinloader from my downloads page for
an example of how to automatically relink each workbook as it is opened.
(feel free to borrow or reuse any code as you want: the XLA password is dm).

Currently my addinloader still gives the message about the workbook
containing external links, but presumably you could also handle that
programmatically.


regards
Charles
______________________
Decision Models
FastExcel Version 2 now available.
www.DecisionModels.com/FxlV2WhatsNew.htm

"Bura Tino" wrote in message
news:FVsmc.42383$I%1.2758376@attbi_s51...

"Bob Phillips" wrote in message
...
Bura,

You are correct, as you had posted to the programming group I did assume
that you were referring to the VBE.

If you mean worksheet, then you don't need a file identifier, you can

call
it directly if it is installed.


And this is what doesn't work for me. If I call it directly if it is
installed it works for me. But if I send the workbook to a colleague and
they also have it installed (but perhaps in a different place), then all
references to the function become qualfied like so:

'C:\PathToWhereIKeepIt\MyAddin.xla'!MyFunction()

and it no longer works. This is a problem that I also described in a post
with a different subject line.

This has become a problem which rendered the add-in that I have been
developing for a month completely useless! I would be very happy if anyone
can help!

Bura
--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Bura Tino" wrote in message
news:Hbkmc.37508$0H1.3454762@attbi_s54...

"Bob Phillips" wrote in message
...
Bura,

If you have installed add-ins, set a reference to the add-in in the

VBE
(ToolsReference), and then you can use its functions as if it were

local.

--

HTH


I think you are talking about using the function in VBA. My question
pertains to using the function in the worksheet.

Bura

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Bura Tino" wrote in message
news:pgdmc.36726$0H1.3179676@attbi_s54...
Hi,

If I use a function defined in a vba add-in, is that considered to

be
a
link
to another workbook? If so, if I use the spreadsheet on another

computer
with the add-in in another directory, how can I make excel look

for
this
function among currently installed add-ins rather than look for

the
same
xla
workbook in the same location?

Thanks.

Bura













Bura Tino

Using a function from a vba add-in: is that considered an external link
 
Hi Charles,

My experience tells me that you are right - those are the only two
solutions. But it just seems to unreasonable!!!
This is not the case for add-ins written in C++. They talk about Excel
application, but how can you have an application which requires the user to
install it in a certain place? What if that place does not exists on the
user's machine? Besides, the "standard" place is different for different
users for the path includes the user's name.

What you are telling us seems true but is hard to believe!

Bewildered,

Bura



"Charles Williams" wrote in message
...
Hi Bura,

Yes it is considered an external link.

Two solutions a
- always install the addin in the same place (use an install package to

make
sure)
- change links in the workbook (either manually or make your addin check
each workbook that is opened for links to itself and change them to

itself)

You can download my auto-reversioning addinloader from my downloads page

for
an example of how to automatically relink each workbook as it is opened.
(feel free to borrow or reuse any code as you want: the XLA password is

dm).

Currently my addinloader still gives the message about the workbook
containing external links, but presumably you could also handle that
programmatically.


regards
Charles
______________________
Decision Models
FastExcel Version 2 now available.
www.DecisionModels.com/FxlV2WhatsNew.htm

"Bura Tino" wrote in message
news:FVsmc.42383$I%1.2758376@attbi_s51...

"Bob Phillips" wrote in message
...
Bura,

You are correct, as you had posted to the programming group I did

assume
that you were referring to the VBE.

If you mean worksheet, then you don't need a file identifier, you can

call
it directly if it is installed.


And this is what doesn't work for me. If I call it directly if it is
installed it works for me. But if I send the workbook to a colleague and
they also have it installed (but perhaps in a different place), then all
references to the function become qualfied like so:

'C:\PathToWhereIKeepIt\MyAddin.xla'!MyFunction()

and it no longer works. This is a problem that I also described in a

post
with a different subject line.

This has become a problem which rendered the add-in that I have been
developing for a month completely useless! I would be very happy if

anyone
can help!

Bura
--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Bura Tino" wrote in message
news:Hbkmc.37508$0H1.3454762@attbi_s54...

"Bob Phillips" wrote in message
...
Bura,

If you have installed add-ins, set a reference to the add-in in

the
VBE
(ToolsReference), and then you can use its functions as if it

were
local.

--

HTH


I think you are talking about using the function in VBA. My question
pertains to using the function in the worksheet.

Bura

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Bura Tino" wrote in message
news:pgdmc.36726$0H1.3179676@attbi_s54...
Hi,

If I use a function defined in a vba add-in, is that considered

to
be
a
link
to another workbook? If so, if I use the spreadsheet on another
computer
with the add-in in another directory, how can I make excel look

for
this
function among currently installed add-ins rather than look for

the
same
xla
workbook in the same location?

Thanks.

Bura
















All times are GMT +1. The time now is 07:57 AM.

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