Strange Macro Behaviour

R

Risky Dave

Hi,

I have a workbook that has a load of macros built into it doing all sorts of
things, but primarily it is concerned with producing a set of charts based on
data imported from another source. There are three main macros:
1) One imports all the source data to a specific place.
2) One populates the various charts.
3) One populates a Word document with a pre-defined selection of these charts.

Each macro is triggered by a different button click.

Each macro works as a standalone piece of code and produces the outputs I
want. However, if I run macro 2) (populate the various charts) then
immediately run macro 3) (populate the Word document) XL closes sompletely,
with no error messages/warnings.

If I run macro 2), save the file and then run macro 3), everything works fine.

can someone please explain in simple terms (I'm not a programmer, I'm
learning the basics of coding as I go along) how I could go about finding
what is causing the code to crash?

TIA

Dave
 
P

Pete_UK

It would help if you posted your code - not many mind readers around
here !!

Pete
 
R

Risky Dave

Pete,

Happy to do so, but there's the best part of 500 lines of code between the
two macros and I didn't want to make horrible long postings.

What I am really after is ways of fault-finding that I could use (bearing in
mind I'm not a programmer so won't understand any technical terms, it needs
to be explained in simple English, I'm afraid).

I can post it all here, or e-mail it if anyone wants to look through it.

Thanks for the interest

Dave
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top