run macro from different workbook

J

jat

i have assigned the following to a picture, on Sheet2 of the file PurchaseOrder

Private Sub Image1_Click()
Call PrintMe
End Sub

the macro is stored in the PurchseOrder file module, and it does several
things:
- saves as pdf on local computer (works)
- emails pdf to accounting (works)
- sometimes an excel copy is requried for future editing and an excel copy
of Sheet2 only is saved on the local computer also (kind of works)
- on the sheet2 that is saved, the picture has the link for the macro
(need the macro to work)
- when i click on the picture, i get the following message: "Cannot run
the macro "filename.xlsx'!PrintMe'. The macro may not be available in this
workbook or all macros may be disabled."

i have the original file opened, but for some reason, the picture click
thinks the macro resides in the new file. how can i permenantly link the
picture click to the parent file (PurchaseOrder) macro PrintMe?

thank you,

jat
 

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