Relative sheet reference?

K

klfhall

Hello - I share spreadsheets via SVN (a version control system). Each
of us has a working copy on our desktop. When I create a sheet that
references another sheet and check it in, the next person to check it
out has links back to the working copy on my desktop. Is there an
easy way (other than manually editing links) to have the worksheet
references change to the second user's working copies on his/her
desktop?

Thanks!
 
J

John Bundy

Here is the solution to a problem posted here back in 2001, you can give it a
try. If anyone else knows a better way I would like to know it. Do this on
workbook open event.

Dim aWorkbookLinks, i As Integer
' Get array of links in workbook
aWorkbookLinks = ThisWorkbook.LinkSources(xlExcelLinks)
' If workbook contains some links
If Not IsEmpty(aWorkbookLinks) Then
' Process each link
For i = 1 To UBound(aWorkbookLinks)
' Change link to thisworkbook
ThisWorkbook.ChangeLink Name:=aWorkbookLinks(i),
NewName:=ThisWorkbook.Name, Type:=xlExcelLinks
Next i
End If
 
K

klfhall

Here is the solution to a problem posted here back in 2001, you can give it a
try. If anyone else knows a better way I would like to know it. Do this on
workbook open event.

Dim aWorkbookLinks, i As Integer
' Get array of links in workbook
aWorkbookLinks = ThisWorkbook.LinkSources(xlExcelLinks)
' If workbook contains some links
If Not IsEmpty(aWorkbookLinks) Then
' Process each link
For i = 1 To UBound(aWorkbookLinks)
' Change link to thisworkbook
ThisWorkbook.ChangeLink Name:=aWorkbookLinks(i),
NewName:=ThisWorkbook.Name, Type:=xlExcelLinks
Next i
End If

--
-John Northwest11
Please rate when your question is answered to help us and others know what
is helpful.






- Show quoted text -

Thank you John - I will try and let you know.

Katie
 
K

klfhall

Here is the solution to a problem posted here back in 2001, you can give it a
try. If anyone else knows a better way I would like to know it. Do this on
workbook open event.

Dim aWorkbookLinks, i As Integer
' Get array of links in workbook
aWorkbookLinks = ThisWorkbook.LinkSources(xlExcelLinks)
' If workbook contains some links
If Not IsEmpty(aWorkbookLinks) Then
' Process each link
For i = 1 To UBound(aWorkbookLinks)
' Change link to thisworkbook
ThisWorkbook.ChangeLink Name:=aWorkbookLinks(i),
NewName:=ThisWorkbook.Name, Type:=xlExcelLinks
Next i
End If

--
-John Northwest11
Please rate when your question is answered to help us and others know what
is helpful.






- Show quoted text -

John,

We created another workaround - FTP directly into the master version
control file. It seems to work but I will save this for another time.

Thanks again,
Katie
 
Top