Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 158
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default 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
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
Is it possible to change the normal excell icon on an excell file? Romileyrunner1 Excel Worksheet Functions 7 September 8th 09 08:38 PM
auto locking of excell workbook (excell 2003) cheekymonkey Excel Discussion (Misc queries) 2 November 14th 08 11:50 PM
how to copy whole Excell workbook without links? Arnis Celmins Excel Discussion (Misc queries) 3 April 20th 06 02:48 PM
Finding cells with links to another worksheet in excell TKC! Excel Discussion (Misc queries) 3 April 20th 06 02:36 PM
how do you open an excell email attacment, if I dont have excell Gary Excel Discussion (Misc queries) 1 February 22nd 06 10:26 PM


All times are GMT +1. The time now is 04:09 AM.

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

About Us

"It's about Microsoft Excel"