Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Links in excell
Hi
I have to open workbooks and have created a link between theese. If I do it by VBA the system are using the UNC adress. If I do it by Excel the system are using the logical. But if I am doing it by VBA, Excell dont recognize this. I think it is something by rights and that I cant do anything about. Anyone know a how to work around this problem. regards Kurt |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Links in excell
I'm not sure what you mean by <But if I am doing it by VBA, Excell dont
recognize this. but I'll try and help anyway. I have noticed in the past however that Excel does tend to change UNC paths to real paths whenever it can - it's been a constant source of annoyance. You could try changing the links back to UNC paths everytime the workbook is saved. Place something like the below in the ThisWorkbook module: Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, _ Cancel As Boolean) Dim linksrc As Variant For Each linksrc In Me.LinkSources(xlExcelLinks) Me.ChangeLink linksrc, GetUNCPath(linksrc), xlExcelLinks Next linksrc End Sub This assumes you have a function called GetUNCPath available that returns the UNC path for any passed path. If you don't have something that does this then please see the below link: http://groups-beta.google.com/group/...fe68c412b24763 HTH, Gareth kurt wrote: Hi I have to open workbooks and have created a link between theese. If I do it by VBA the system are using the UNC adress. If I do it by Excel the system are using the logical. But if I am doing it by VBA, Excell dont recognize this. I think it is something by rights and that I cant do anything about. Anyone know a how to work around this problem. regards Kurt |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Links in excell
I have found the source to my problem.
th problem is the function "hyperlinks" this I use to jump from workbook to workbook and this function are using the UNC adress; and this is changing the logical adress in the links. thanks for your help regards Kurt |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Is it possible to change the normal excell icon on an excell file? | Excel Worksheet Functions | |||
auto locking of excell workbook (excell 2003) | Excel Discussion (Misc queries) | |||
how to copy whole Excell workbook without links? | Excel Discussion (Misc queries) | |||
Finding cells with links to another worksheet in excell | Excel Discussion (Misc queries) | |||
how do you open an excell email attacment, if I dont have excell | Excel Discussion (Misc queries) |