Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default How change link source in long formula when source moved

Hello!
Plz, help me change link source in LONG formula when source moved or renamed.
When open workbook with such links or on the other computer, formula
damages, and change source already crashed.
Method ChangeLink of workbook object does'nt work too.
How to do my "user defined functions" Excel feels as its own?
May be, I should place my xla in a special folder?
Thank you in advance.
Irina

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 175
Default How change link source in long formula when source moved

I have tried to do this and I think that the simple answer is that you may
have to do this manually. There are multiple limits on formulae length -
array formulae are limited to (I think) 120 characters, but regular formulae
are (I think) 255 characters. But they are treated differently if entered in
VBA or in the user interface. You can check out Chip Pearsons website - I
think he documents all the lengths somewhere.

When I encountered this, rather than spend ages on working out the
limitations I just threw a dialogue box asking the user to manually amend the
links and the restart the code.

Sorry for not being able to answer positively, thought the workaround many
be useful though.


--
www.alignment-systems.com


"Irina" wrote:

Hello!
Plz, help me change link source in LONG formula when source moved or renamed.
When open workbook with such links or on the other computer, formula
damages, and change source already crashed.
Method ChangeLink of workbook object does'nt work too.
How to do my "user defined functions" Excel feels as its own?
May be, I should place my xla in a special folder?
Thank you in advance.
Irina

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default How change link source in long formula when source moved

Thank you for the answer.
Evidently, it is acceptable way to avoid length limitations, but I couldn't
understand when exactly I should threw a dialogue box, because when workbooks
is opened, it is already damaged. Unfortunately, Excel application has no
event "BeforeOpen".
Anyway, thank you very much, I'll try to do something in that way.

"John.Greenan" wrote:

I have tried to do this and I think that the simple answer is that you may
have to do this manually. There are multiple limits on formulae length -
array formulae are limited to (I think) 120 characters, but regular formulae
are (I think) 255 characters. But they are treated differently if entered in
VBA or in the user interface. You can check out Chip Pearsons website - I
think he documents all the lengths somewhere.

When I encountered this, rather than spend ages on working out the
limitations I just threw a dialogue box asking the user to manually amend the
links and the restart the code.

Sorry for not being able to answer positively, thought the workaround many
be useful though.


--
www.alignment-systems.com


"Irina" wrote:

Hello!
Plz, help me change link source in LONG formula when source moved or renamed.
When open workbook with such links or on the other computer, formula
damages, and change source already crashed.
Method ChangeLink of workbook object does'nt work too.
How to do my "user defined functions" Excel feels as its own?
May be, I should place my xla in a special folder?
Thank you in advance.
Irina

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 274
Default How change link source in long formula when source moved


Irina,

I have used the following method to achieve what you want. It may not
be very efficient and depending on the size of your workbook may be
quite slow but it will definitely be quicker that amending the
formula's manually. From memory this is what l did,


Use the Workbook_Open event to suppress Excel's alerts

ie Application.DisplayAlerts = False

then do a find / replace

ie find =
replace '=

this effectively changes the formula to text and avoids having to wait
for Excel to re-calculate all the time. (You might consider turning the
calculation mode to manual)

Then do a find / replace to change the workbook name

ie find currentlink.xls
replace newlink.xls

Than convert the text back to formula's

ie find '=
replace =

When l was doing it l seem to remember having a few syntax problems so
make sure that save your file before testing the code and test the code
on a small number of cells first.

Regards

Michael Beckinsale

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default How change link source in long formula when source moved

I found answer myself. It is a known bug of Microsoft Excel, it is described
in
Article ID: 817578. It is written, that the bug is fixed in Microsoft Office
XP SP3, but it is not the truth.


"Irina" wrote:

Hello!
Plz, help me change link source in LONG formula when source moved or renamed.
When open workbook with such links or on the other computer, formula
damages, and change source already crashed.
Method ChangeLink of workbook object does'nt work too.
How to do my "user defined functions" Excel feels as its own?
May be, I should place my xla in a special folder?
Thank you in advance.
Irina

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
Change Link Source Mike H. Excel Discussion (Misc queries) 0 January 20th 10 10:38 PM
Can Change (link) Source take hours? xrbbaker Excel Discussion (Misc queries) 3 January 17th 07 08:58 PM
Change source ofr edit link is greyed out PML Excel Worksheet Functions 0 April 15th 06 10:31 PM
Change Source of Link in Protected Sheet Chiku Excel Discussion (Misc queries) 0 December 22nd 05 06:37 PM
How to change the source of a link- Instructions were followed. I. RJ Excel Worksheet Functions 2 December 17th 04 06:59 PM


All times are GMT +1. The time now is 01:33 AM.

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

About Us

"It's about Microsoft Excel"