How to enter a formula (cell reference) to a shape instead of text

  • Thread starter Thread starter LucaP
  • Start date Start date
L

LucaP

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").Formula = "=" &
WorksheetB.Name & "!" & WorksheetB.Cells(1, 1).Address(RowAbsolute:=False,
ColumnAbsolute:=False)

How is this done in Excel 2007?

Thanks
 
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").Formula = "=" &
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("my2ndshape").oleformat.object.formula = "=" & worksheetb.name & "!a1"

hth,
hector.
 
Hi Hector

Thanks for the input.
The solution works, but only if previously I remove (even a non-existing)
text:
worksheeta.shapes("mygroup").groupItems("my2ndshape").oleformat.object.text=
""

regards
Luca
 
hi, Luca !
Thanks for the input.
The solution works, but only if previously I remove (even a non-existing) text:
worksheeta.shapes("mygroup").groupItems("my2ndshape").oleformat.object.text= ""

regards
Luca

thanks to you Luca, for the feed-back ;)

regards,
hector.

__ OP __
 
Back
Top