LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #13   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,298
Default Programming "Shape" objects (Part 2)

I too never knew that a shape also hade a formula property. Good one !

"Dave Peterson" wrote:

I used the Shp variable because I couldn't remember where or how deep I had to
go to get to it.

The object browser did help, but it does take a bit of looking (unless you've
got a very good memory).

Rick Rothstein wrote:

I didn't realize that, or even think to look to see if, Shapes had a Formula
property. I learned something new today... thanks. And yes, I agree with
Andy, that is a much cleaner way to go than a macro.

--
Rick (MVP - Excel)

"Dave Peterson" wrote in message
...
But looking through the object browser is painful for my old eyes!

Andy Pope wrote:

Dave, that is certainly a lot cleaner than the macro recorded Excel4 code
:)

Cheers
Andy
--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info
"Dave Peterson" wrote in message
...
Another option for that dynamic link:

Dim Shp As Shape
Set Shp = ActiveSheet.Shapes("Oval 1")
Shp.DrawingObject.Formula = "=A1"


Andy Pope wrote:

Hi,

To create a dynamic link try,

ActiveSheet.Shapes("Oval 1").Select
ExecuteExcel4Macro "FORMULA(""=R1C1"")"

Cheers
Andy

--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info
"Robert Crandal" wrote in message
...
Excellent! This works fantastic.

BTW, I tried putting a sum() formula in cell A1 instead of a
constant string. My formula is "=sum(A4:A6)". I noticed that if I
change the values of any cells between A4 to A6 that the sum
does not dynamically display on my shape object. Do you know
why this is happening??

Thank u sooo much!


"Patrick Molloy" wrote in
message ...
use the sheet's change event -- right click the sheet tab and
select
view
code

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = Range("A1").Address Then
Shapes("Oval 1").Select
Selection.Characters.Text = Target.Value
Target.Select
End If
End Sub



--

Dave Peterson

--

Dave Peterson


--

Dave Peterson
.

 
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
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell Steve Kay Excel Discussion (Misc queries) 2 August 8th 08 01:54 AM
copy data from one sheet to another "entry has to be same shape" des-sa[_2_] Excel Discussion (Misc queries) 3 July 26th 08 06:38 PM
Excel 2007 Bug - "Locked" Property is Broken for Shape Objects NOSLOW Excel Programming 0 August 21st 07 07:01 PM
Excel 2007 Bug - "Locked" Property is Broken for Shape Objects NOSLOW Excel Programming 0 August 21st 07 07:01 PM
How to prevent "Changed ... Save?" Message after disabling Shape? Joe HM Excel Programming 5 August 4th 06 04:28 PM


All times are GMT +1. The time now is 10:21 AM.

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"