Run macro from shape when runnig macro in Excel 2007

B

bren

Hi,

I´m recording a macro that tries to run a macro from a shape, but it
doesn´t work in Excel 2007. I don´t know if this is a problem of this
version because I could do it in 2003.

Thanks
 
G

Gary''s Student

Make sure the macro you have assigned to the shape is a public sub in a
standard module:

Sub Picture1_Click()
'
' Picture1_Click Macro
'
' Keyboard Shortcut: Ctrl+e
'
Range("G3").Select
ActiveCell.FormulaR1C1 = "1"
Range("G4").Select
End Sub

Sub dural()
Call Picture1_Click
End Sub
 
B

bren

Hi,

It already creates it on a standard module and it´s public and it doesn
´t seem to work when I´m recording a macro and I try to click on the
shape to run the macro assigned to it. Your example seems to been made
with a picture and it works fine with pictures but not with shapes.
Any ideas?

Thank so much for your help.
 

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