automating my errors

thuy4657

New Member
Joined
Dec 23, 2005
Messages
5
does anyone know how to automate clicking continue on a error for a missing link? I get a error dialog box but as soon as i click continue the error the value goes away. i was wondering is there away to catch this error in vba and just make it carry through?
 

Some videos you may like

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.

XLGibbs

Well-known Member
Joined
Feb 25, 2005
Messages
2,446
That depends on the error.

Some versions of excel, including mine, have an occasional error

"The code execution has been interrupted" which in my research cannot be trapped as it is not an actual error in the code and you must keep hitting continue. Usually a desktop reboot solves the problem per MS web info and that works for me.

Other forms of errors if recurring but not detrimental to the operations involved can be avoided by placing :

On Error Resume Next

above the within the subroutine. This is dangerous though as you may not be appraised of critical errors that may result in poor results.
 

thuy4657

New Member
Joined
Dec 23, 2005
Messages
5
hey
its a workbook contains one or more links which cannot be updated error.

is there away to automate it on open / preset errors to be handelled? something like appExcel.AskToUpdateLinks = False ??????
 

thuy4657

New Member
Joined
Dec 23, 2005
Messages
5

ADVERTISEMENT

Thanks for the tip but i still can't seem to get it to work
this is what i have as the code
Set wkbChart = appExcel.Workbooks.Open(ActiveTemplate.Path & "\MorningCableChart.xls", UpdateLinks:=3)

is that correct? excel still opens with the error.
 

XLGibbs

Well-known Member
Joined
Feb 25, 2005
Messages
2,446
You mean you have linked formulas that are, for all purposes "dead", as in they no longer exist or something?

It would be a good idea to remove those from the file. In most cases I have seen of this, it is a named range that refers to an external file that is no longer a valid reference, but no one deleted or changed the name. It also happens if you copy a file with a named range in it, but not all the sheets from that file...
 

leaftye

New Member
Joined
Dec 13, 2005
Messages
21
Sorry, I posted incorrectly. It should be this to ignore links:

Code:
Workbooks.Open Filename:="filename.xls", UpdateLinks:=0
 

Watch MrExcel Video

Forum statistics

Threads
1,119,002
Messages
5,575,478
Members
412,667
Latest member
rpbenz
Top