PC Review


Reply
Thread Tools Rate Thread

Add to LinkSources

 
 
MPF
Guest
Posts: n/a
 
      5th Aug 2009
Is it possible with VBA to add to LinkSources? I've found code to edit/
delete items, but nothing for adding.

Thanks,

Morgan
 
Reply With Quote
 
 
 
 
Dave Peterson
Guest
Posts: n/a
 
      5th Aug 2009
You could add a formula that links to a cell in another workbook.

Why would you want to do this?

MPF wrote:
>
> Is it possible with VBA to add to LinkSources? I've found code to edit/
> delete items, but nothing for adding.
>
> Thanks,
>
> Morgan


--

Dave Peterson
 
Reply With Quote
 
MPF
Guest
Posts: n/a
 
      5th Aug 2009
Each week we need to add references to 6 or so files in a new
directory for that week. Just trying to automate the process since the
only thing that changes is the folder name.

Sorry for sounding dense, but if I just append the the locations to
cells in another worksheet, this will put the reference in the "Edit
Links" dialog?

Thanks,

Morgan


On Aug 5, 9:32*am, Dave Peterson <peter...@verizonXSPAM.net> wrote:
> You could add a formula that links to a cell in another workbook.
>
> Why would you want to do this?
>
> MPF wrote:
>
> > Is it possible with VBA to add to LinkSources? I've found code to edit/
> > delete items, but nothing for adding.

>
> > Thanks,

>
> > Morgan

>
> --
>
> Dave Peterson


 
Reply With Quote
 
Dave Peterson
Guest
Posts: n/a
 
      6th Aug 2009
I don't understand what you mean by references here.

But those sources are the files that your formulas use.

I'm not sure how you'd have a formula that retrieved a value from a file in a
folder that doesn't exist.



MPF wrote:
>
> Each week we need to add references to 6 or so files in a new
> directory for that week. Just trying to automate the process since the
> only thing that changes is the folder name.
>
> Sorry for sounding dense, but if I just append the the locations to
> cells in another worksheet, this will put the reference in the "Edit
> Links" dialog?
>
> Thanks,
>
> Morgan
>
> On Aug 5, 9:32 am, Dave Peterson <peter...@verizonXSPAM.net> wrote:
> > You could add a formula that links to a cell in another workbook.
> >
> > Why would you want to do this?
> >
> > MPF wrote:
> >
> > > Is it possible with VBA to add to LinkSources? I've found code to edit/
> > > delete items, but nothing for adding.

> >
> > > Thanks,

> >
> > > Morgan

> >
> > --
> >
> > Dave Peterson


--

Dave Peterson
 
Reply With Quote
 
MPF
Guest
Posts: n/a
 
      6th Aug 2009
Thanks for replying Dave, I appreciate it.

What I'm trying to do is "spoof" a reference to a file, not
necessarily to the content within.

I've got a worksheet with a list of file-names and a cell for the user
to enter the corresponding folder name to reference. From that, I want
to add to the Edit Links items via macro. Since I have no knowledge of
the structure of the content, I'm not trying to reference cell(s).

The primary reason for this is the referenced files are on a
SharePoint server and expecting the user to know the full URL for the
reference isn't realistic.

Since there appears to be no alias for the linked file, this may be an
exercise in futility.

Thanks,

Morgan

On Aug 5, 5:49*pm, Dave Peterson <peter...@verizonXSPAM.net> wrote:
> I don't understand what you mean by references here.
>
> But those sources are the files that your formulas use. *
>
> I'm not sure how you'd have a formula that retrieved a value from a file in a
> folder that doesn't exist.
>
>
>
> MPF wrote:
>
> > Each week we need to add references to 6 or so files in a new
> > directory for that week. Just trying to automate the process since the
> > only thing that changes is the folder name.

>
> > Sorry for sounding dense, but if I just append the the locations to
> > cells in another worksheet, this will put the reference in the "Edit
> > Links" dialog?

>
> > Thanks,

>
> > Morgan

>
> > On Aug 5, 9:32 am, Dave Peterson <peter...@verizonXSPAM.net> wrote:
> > > You could add a formula that links to a cell in another workbook.

>
> > > Why would you want to do this?

>
> > > MPF wrote:

>
> > > > Is it possible with VBA to add to LinkSources? I've found code to edit/
> > > > delete items, but nothing for adding.

>
> > > > Thanks,

>
> > > > Morgan

>
> > > --

>
> > > Dave Peterson

>
> --
>
> Dave Peterson


 
Reply With Quote
 
Dave Peterson
Guest
Posts: n/a
 
      6th Aug 2009
You could create a formula (you need to have a link to something) that tries to
retrieve a value from a bogus folder and bogus workbook in that folder (but the
sheetnames have to be correct, I think) and to a cell.

I don't use sharepoint, but I could use:

='C:\My Documents\Excel\[this doesn't exist.xls]Sheet1'!$A$1

I'll get a prompt to find that file, but I can dismiss that. The formula will
evaluate to #Ref!, but I can use edit|links|change source.

Have you thought of just creating a dummy workbook in a dummy folder and
pointing to that. Then you can just change the link to point to the real
workbook in the real folder.



MPF wrote:
>
> Thanks for replying Dave, I appreciate it.
>
> What I'm trying to do is "spoof" a reference to a file, not
> necessarily to the content within.
>
> I've got a worksheet with a list of file-names and a cell for the user
> to enter the corresponding folder name to reference. From that, I want
> to add to the Edit Links items via macro. Since I have no knowledge of
> the structure of the content, I'm not trying to reference cell(s).
>
> The primary reason for this is the referenced files are on a
> SharePoint server and expecting the user to know the full URL for the
> reference isn't realistic.
>
> Since there appears to be no alias for the linked file, this may be an
> exercise in futility.
>
> Thanks,
>
> Morgan
>
> On Aug 5, 5:49 pm, Dave Peterson <peter...@verizonXSPAM.net> wrote:
> > I don't understand what you mean by references here.
> >
> > But those sources are the files that your formulas use.
> >
> > I'm not sure how you'd have a formula that retrieved a value from a file in a
> > folder that doesn't exist.
> >
> >
> >
> > MPF wrote:
> >
> > > Each week we need to add references to 6 or so files in a new
> > > directory for that week. Just trying to automate the process since the
> > > only thing that changes is the folder name.

> >
> > > Sorry for sounding dense, but if I just append the the locations to
> > > cells in another worksheet, this will put the reference in the "Edit
> > > Links" dialog?

> >
> > > Thanks,

> >
> > > Morgan

> >
> > > On Aug 5, 9:32 am, Dave Peterson <peter...@verizonXSPAM.net> wrote:
> > > > You could add a formula that links to a cell in another workbook.

> >
> > > > Why would you want to do this?

> >
> > > > MPF wrote:

> >
> > > > > Is it possible with VBA to add to LinkSources? I've found code to edit/
> > > > > delete items, but nothing for adding.

> >
> > > > > Thanks,

> >
> > > > > Morgan

> >
> > > > --

> >
> > > > Dave Peterson

> >
> > --
> >
> > Dave Peterson


--

Dave Peterson
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
LinkSources full workbook path alasdair_gifford@hotmail.com Microsoft Excel Programming 1 18th Nov 2007 01:17 PM
Excel Linksources / no object array enumerator Ali Tahbaz Microsoft C# .NET 3 28th May 2004 04:02 PM
Excel Linksources / no object array enumerator Ali Tahbaz Microsoft Excel Misc 3 28th May 2004 04:02 PM
LinkSources (Excel 97) John Thow Microsoft Excel Discussion 2 19th Dec 2003 10:01 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:54 PM.