PC Review


Reply
Thread Tools Rate Thread

Changing references in a batch of files?

 
 
Gustaf
Guest
Posts: n/a
 
      27th Oct 2009
Hi all,

I got a large number of Excel files, all with a reference (in the VBA editor) to another file. I wonder if it's possible to programmatically change the reference in all files, to save the repetitive work of changing each manually?

Gustaf
 
Reply With Quote
 
 
 
 
Patrick Molloy
Guest
Posts: n/a
 
      27th Oct 2009
I don't think its possible because the compiler would break.
Why not just rename the original referenced file -- as backup- and rename
the new file with the original file referenced name?

"Gustaf" wrote:

> Hi all,
>
> I got a large number of Excel files, all with a reference (in the VBA editor) to another file. I wonder if it's possible to programmatically change the reference in all files, to save the repetitive work of changing each manually?
>
> Gustaf
> .
>

 
Reply With Quote
 
Peter T
Guest
Posts: n/a
 
      27th Oct 2009
References are always to "another file". Depending on the type reference, ie
file, it might be easy, unreliable, or impossible. Describe "another file".

Regards,
Peter T

"Gustaf" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi all,
>
> I got a large number of Excel files, all with a reference (in the VBA
> editor) to another file. I wonder if it's possible to programmatically
> change the reference in all files, to save the repetitive work of changing
> each manually?
>
> Gustaf



 
Reply With Quote
 
Don Guillett
Guest
Posts: n/a
 
      27th Oct 2009
It depends. I recently wrote a macro to open all files in a folder and
delete a procedure in a worksheet_change event and insert a new one >save
and close the file.
Details?

--
Don Guillett
Microsoft MVP Excel
SalesAid Software
(E-Mail Removed)
"Gustaf" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi all,
>
> I got a large number of Excel files, all with a reference (in the VBA
> editor) to another file. I wonder if it's possible to programmatically
> change the reference in all files, to save the repetitive work of changing
> each manually?
>
> Gustaf


 
Reply With Quote
 
K_Macd
Guest
Posts: n/a
 
      27th Oct 2009
Have a look at Chip Pearson's site (http://www.cpearson.com/excel/vbe.aspx).
He has got some good clues on programing at the vbe editor level. There is
definitely an .addreferences method in the VBE command set. You may be able
to set up a loop that programmatically opens each file then redefines the
reference.

--
Ken
"Using Dbase dialects since 82"
"Started with Visicalc in the same year"


"Patrick Molloy" wrote:

> I don't think its possible because the compiler would break.
> Why not just rename the original referenced file -- as backup- and rename
> the new file with the original file referenced name?
>
> "Gustaf" wrote:
>
> > Hi all,
> >
> > I got a large number of Excel files, all with a reference (in the VBA editor) to another file. I wonder if it's possible to programmatically change the reference in all files, to save the repetitive work of changing each manually?
> >
> > Gustaf
> > .
> >

 
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
calling multiple batch files from within a batch file yawnmoth Windows XP General 3 26th May 2008 06:47 PM
Changing References Don Microsoft Access 2 27th Sep 2005 01:50 PM
Batch Changing of Extensions from JPE to JPG Dennis Hughes Windows XP General 11 19th Jun 2005 06:18 AM
batch changing printer ACL Hugo Microsoft Windows 2000 Security 3 6th Nov 2003 07:49 PM
Photo Editor Batch supporting batch compression JPG files 29150 Freeware 2 23rd Jun 2003 06:02 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:14 AM.