Relative sheet reference?

  • Thread starter Thread starter klfhall
  • Start date Start date
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!
 
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
 
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
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top