View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Andrew[_16_] Andrew[_16_] is offline
external usenet poster
 
Posts: 66
Default Shape.OnAction stops working after workbook closed and re-opened

I have created a set of icons which are made up of 3-4 individual
shape objects grouped together. One of those objects needs to respond
to a mouse click which I achieve using the OnAction setting, ie.
shp.GroupItems(shp.Name).OnAction = "ShapeClick"
where the shape and the group have the same name.

Connector lines are used to join the icons up into a network.
Unfortunately in XL2007 when connecting a line to the object the click
event fires so to avoid this I first set OnAction to "" and then set
it back to my macro after connections are made.

Initially this works beautifully however after closing and re-opening
the workbook it stops working and my OnAction code line results in
"Application-defined or object-defiend error".

Does anyone have any idea why simply closing and re-opening the
workbook might be having this effect?

Thanks,
Andrew