LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Prevent Errors When Using Links

You could try <bg.

I think you'd need an application event that looks for links when you're saving
any (and all) workbooks. Chip Pearson has some instructions about using
application events he

http://www.cpearson.com/excel/AppEvent.htm

But it still sounds scary to me.

If I have wkbkA open (happily making changes to the data) and your code tries to
open the file to update it, then you'll have trouble.

If you (or the users) decide that macros shouldn't be enabled--or that events
should be turned off, then there's trouble.

You're not going to like my response, but here goes.

I think one person should be responsible for making layout changes to those data
workbooks. Anyone can update (if you want), but no one can move columns around
or insert/delete columns. (Formulas in those receiving workbooks have to be
more robust, too--like Mike H. suggested.)

Then if that data workbook has to be redesigned, then one person makes the
changes. And updates the other workbooks--or at least informs or helps the
others with their updates. The timing would have to be published, too.

On June 30, 2008, workbookA.xls is changing its format. Existings columns J:K
will now hold xxx and yyy. There will be new data added in columns L:M. There
is a test workbook in zzzzzz that you can use to make sure your files will
retrieve the correct information.

Please contact Spencer Sadkin at xxxx if you have questions or help modifying
your workbooks.



wrote:

Dave,

Let me clarify.

Assume two workbooks wkbkA and wkbkB.

wkbkA contains data, and wkbkB is just created. You Decide that wkbkb
Cell C7 should contain a link to wkbkA. You go to Save wkbkB and your
add-in (on save) runs. the macro writes to wkbkA and creates a tab
that is hidden and contains a note that says path\wkbkB.xls'sheet1!
c7 then everything saves and wkbkA is closed (you never see that
wkbkA was open (in fact it shouldnt be opened just directly written
to))... then if someone opens wkbkA and decides to insert a new column
shifting column c to the right and becoming column d this would screw
up your wkbkB if you updated links. to prevent this when the user
goes to save wkbkA the macro runs and reads the hidden tab and will
alert the user that path\wkbkB.xls'sheet1!c7 will be affected. Then it
will prompt the user to cancel the save or to edit the link for them.

Mike,

I like the idea of a macro that writes the source down but thats also
why I like a true link, the link is the source.


--

Dave Peterson


 
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
#REF errors in links srinivasan Excel Worksheet Functions 0 February 23rd 10 05:56 PM
Prevent function errors caused by cutting & paste or drag & drop Learning More Each Day Excel Worksheet Functions 2 November 2nd 09 09:42 PM
Prevent VBE from opening on errors? Ed from AZ Excel Programming 4 April 5th 08 12:06 AM
How to prevent broken links? Allen_N Excel Programming 2 November 22nd 06 03:56 AM
How do I prevent my links from breaking in Excel? Excel links Excel Worksheet Functions 1 November 16th 04 05:53 PM


All times are GMT +1. The time now is 08:52 AM.

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

About Us

"It's about Microsoft Excel"