View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Héctor Miguel Héctor Miguel is offline
external usenet poster
 
Posts: 434
Default How to enter a formula (cell reference) to a shape instead of text

hi, Luca !

In Excel 2003 it was possible to set a reference to a cell to show the value of that cell in a grouped shape:

WorksheetA.Shapes("ABC").GroupItems("ABC_DEF").For mula = "=" &
WorksheetB.Name & "!" & WorksheetB.Cells(1, 1).Address(RowAbsolute:=False,
ColumnAbsolute:=False)

How is this done in Excel 2007?


i don't know what type of (grouped) shapes are you talking about (but...)
this is working for me in xl2007:

worksheeta.shapes("mygroup").groupItems("my2ndshap e").oleformat.object.formula = "=" & worksheetb.name & "!a1"

hth,
hector.