ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How to Change External Link to Internal Link (https://www.excelbanter.com/excel-programming/371587-how-change-external-link-internal-link.html)

Chaplain Doug

How to Change External Link to Internal Link
 
Excel 2003. I am programmatically copying selected sheets from one workbook
to another. For example, I copy four sheets from one workbook to another.
The fourth sheet copied has formulas that reference the first three sheets
copied. When the fourth sheet is copied, an external link is created in
these formulas that references the "copy from" workbook. I want the fourth
sheet to reference the sheets in the "copy to" workbook rather than the "copy
from" workbook. How may I accomplish this? Thanks for any help.
--
Dr. Doug Pruiett
Good News Jail & Prison Ministry
www.goodnewsjail.org

Franz Verga

How to Change External Link to Internal Link
 
Chaplain Doug wrote:
Excel 2003. I am programmatically copying selected sheets from one
workbook to another. For example, I copy four sheets from one
workbook to another. The fourth sheet copied has formulas that
reference the first three sheets copied. When the fourth sheet is
copied, an external link is created in these formulas that references
the "copy from" workbook. I want the fourth sheet to reference the
sheets in the "copy to" workbook rather than the "copy from"
workbook. How may I accomplish this? Thanks for any help.



Hi Doug,

I don't if it is possible from a macro, but from menu Edit, Links, you have
the possibility to change the source of a link from a workbook to another,
even to the workbook in which the link is.

You could try to record a macro when you do the operations...

--
(I'm not sure of names of menus, options and commands, because
translating from the Italian version of Excel...)

Hope I helped you.

Thanks in advance for your feedback.

Ciao

Franz Verga from Italy



[email protected]

How to Change External Link to Internal Link
 

Chaplain Doug wrote:
Excel 2003. I am programmatically copying selected sheets from one workbook
to another. For example, I copy four sheets from one workbook to another.
The fourth sheet copied has formulas that reference the first three sheets
copied. When the fourth sheet is copied, an external link is created in
these formulas that references the "copy from" workbook. I want the fourth
sheet to reference the sheets in the "copy to" workbook rather than the "copy
from" workbook. How may I accomplish this? Thanks for any help.
--
Dr. Doug Pruiett
Good News Jail & Prison Ministry
www.goodnewsjail.org


Hi Chaplain.

Try using changelinks method ... eg
ActiveWorkbook.ChangeLink "c:\excel\book1.xls", "c:\excel\book2.xls",
xlExcelLinks


Please check the help file for additional info ..

Cheers,
Tausif


Chaplain Doug

How to Change External Link to Internal Link
 
Thank uyou for the tip. That is what I used.
--
Dr. Doug Pruiett
Good News Jail & Prison Ministry
www.goodnewsjail.org


" wrote:


Chaplain Doug wrote:
Excel 2003. I am programmatically copying selected sheets from one workbook
to another. For example, I copy four sheets from one workbook to another.
The fourth sheet copied has formulas that reference the first three sheets
copied. When the fourth sheet is copied, an external link is created in
these formulas that references the "copy from" workbook. I want the fourth
sheet to reference the sheets in the "copy to" workbook rather than the "copy
from" workbook. How may I accomplish this? Thanks for any help.
--
Dr. Doug Pruiett
Good News Jail & Prison Ministry
www.goodnewsjail.org


Hi Chaplain.

Try using changelinks method ... eg
ActiveWorkbook.ChangeLink "c:\excel\book1.xls", "c:\excel\book2.xls",
xlExcelLinks


Please check the help file for additional info ..

Cheers,
Tausif




All times are GMT +1. The time now is 12:32 PM.

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