Excel – Can’t assign macro in excel

excelvba

I am having some trouble with macros in my excel workbook. I have a couple of auto-shapes on one of my sheets which are grouped together for drawings. 2 of these have macros assigned to them (as 'kitchen – 1.xls'!but59 and 'kitchen – 1.xls'!but60), but I can't seem to assign macros to the other 2 shapes. I have tried right clicking on the shape, Assign Macro, select the macro that I wan to assign to, and then click Okay. But when I double check which macro it calls, it still calls Baseunits_fbase3_3_Click – it creates this new macro and I can't seem to force it to use my already written macro. Is there any other way to assign the macro that I need?


EDIT: I am kind of hoping that there is perhaps a way to assign the macro via VBA, but I can't see any reference to that in the online VBA reference anywhere. Does anyone know if this is possible?

Best Answer

I take it this is for Excel 2003??

What you are doing sounds correct. It sounds like there is a problem with the Grouping.

You have two options:

  1. In Baseunits_fbase3_3_Click, call the 'kitchen - 1.xls'!but59

  2. Delete all the objects in that group, and try again

The first option is a bit excessive and the second is a little drastic.

Good luck!

Related Topic