View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Jim Thomlinson[_3_] Jim Thomlinson[_3_] is offline
external usenet poster
 
Posts: 983
Default Excel macro crashes when it sets a cell formula

Can you post the procedure where the error is being raised. Tough to debug
without some code... UDF normally stands for User Defined Function... That is
probably what Tom means.

"Dr Rubick" wrote:

I guess I wasn't clear on that in the origonal message. At first it just
stopped in the middle of running the code without displaying any error
message or brining up the visual basic editor. After getting this error, I
added an "On Error Goto..." to find out what the error is. That's where I
got error number 1004.

I don't recognize your "UDF" acronym. What are they and how would I look
for them?

"Tom Ogilvy" wrote:

Possibly the other workbook has UDF's that are improperly constructed and
raise an error.

If you don't get an error, it is unclear how you trap one. Maybe your
current code has On Error Resume Next that is masking some errors in your
code as well.

--
Regards,
Tom Ogilvy


"Dr Rubick" <Dr wrote in message
...
I have a large and complicated excel file with a lot of named cell ranges.
Every time the user makes a change, a macro updates every named range,
changing data validation as necessary, changing fonts to signal errors,

and
in some cases entering new excel formulas. As long as I work on this file
stand-alone, everything works.

The problem is when I open another file with cell formulas that refer to
this file. As long as that second file is open, the macro in my origonal
file crashes. It seems to crash at the point where it changes any cell
formula. I'm not certain, because it doesn't go into debug mode, but

rather
simply stops. When I try to trap the error, I read it as error 1004 -
"Application Defined or Object Defined Error"

I have not found any way to make this problem go away, other than closing
the file that links to this one. Anyone know what is happening here?