Macro "save as pdf" question

R

Rocket

Hello all,

I've made a simple macro to deal with some data that I have plotted on a
chart. For the final step of the macro, I would like it to save the graph as
a pdf file. It's much easier to use the pdf files in presentations, or other
documents. When I have finished the project, I would also like to combine all
(or at least groups of) the individual pdf files into a single file. Each one
represents a chemical analysis for my work.

When I recorded the macro, I used the "save as pdf" button on the "save as"
dialogue box and the graph is saved as a pdf - just like I want. After it was
done, I ended the recording and thought all would be sweet.
However, when I run the macro on a new file, the preliminary parts of the
macro work perfectly, however, it won't make the pdf and instead tried to
send the file to my printer, or returns an error message saying that my
printer was not found. (I think the error code was 1004)


Is it possible to make a macro to save the graph as a pdf file as I have
described above? If so, could you give me an idea of the syntax that I should
use. I'm just a beginner at VB and macros, so please keep it simple if
possible.

If it's not possible to make the macro do this, I could run the macro without
the "save as pdf" part, but would still like to save each graph as a pdf. Are
there any solutions to automate it? It will be a real pain otherwise.

I am using 10.2.4 and Excel version X

Many thanks in advance,

Rocket
 

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