Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default How to enter a formula (cell reference) to a shape instead of text

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?

Thanks
  #2   Report Post  
Posted to microsoft.public.excel.programming
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.


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default How to enter a formula (cell reference) to a shape instead of

Hi Hector

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

regards
Luca


"Héctor Miguel" wrote:

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.



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 434
Default How to enter a formula (cell reference) to a shape instead of

hi, Luca !

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

regards
Luca


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

regards,
hector.

__ OP __
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"



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can a text box use a formula or cell reference Joe M. Excel Discussion (Misc queries) 4 April 3rd 23 02:25 PM
Enter text and formula in a cell Carter68 Excel Worksheet Functions 7 January 27th 09 03:41 PM
Need a formula: If TIME is or < than a cell enter TEXT cyndinmarianne Excel Programming 2 August 8th 08 07:17 AM
Use text in formula as a cell reference steveylevi Excel Discussion (Misc queries) 13 July 30th 08 12:09 AM
How to enter an Excel cell reference into a line of text in Excel WUDFAL Excel Worksheet Functions 2 December 5th 06 10:37 PM


All times are GMT +1. The time now is 04:46 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"