Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 160
Default Automating the "Oval" Object

Is it possible to link text in the Oval object (from the Drawing toolbar) with text in a merged cell range - the object being when a user types text in one, it appears in the other? If so how would this be done?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 391
Default Automating the "Oval" Object

This can be done using the sheet's Change event. This is
fired when a new value is entered into a cell.

The example places the text from cell C3 into the oval.
I've drawn an oval and left the default name 'Oval 1' in
the code.

Paste the following code into your worksheet's code page.
To open the code page, right click on the sheet's tab and
select the last menu item: 'View Code'


Private Sub Worksheet_Change(ByVal Target As Range)

If Target.Address = "$C$3" Then

ActiveSheet.Shapes("Oval 1").Select
Selection.Characters.Text = Target.Text


Target.Select
End If

End Sub


First the code check's that the changed cell is C3. If it
is the oval is selected, the text is changed and then the
cell is re-selected.

It's a pity, but this is one object that you have to
select for this.

Patrck Molloy
Microsoft Excel MVP


-----Original Message-----
Is it possible to link text in the Oval object (from the

Drawing toolbar) with text in a merged cell range - the
object being when a user types text in one, it appears in
the other? If so how would this be done?
.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Automating the "Oval" Object

Actually you don't have to select it. You can use

Private Sub Worksheet_Change(ByVal Target As Range)
Dim shp As Shape
If Target.Address = "$C$3" Then
Set shp = ActiveSheet.Shapes("Oval 2")
shp.TextFrame.Characters.Text = Target.Text
End If

End Sub

or

Activesheet.Ovals("Oval 2").Text = Target.Text

--
Regards,
Tom Ogilvy

"Patrick Molloy" wrote in message
...
This can be done using the sheet's Change event. This is
fired when a new value is entered into a cell.

The example places the text from cell C3 into the oval.
I've drawn an oval and left the default name 'Oval 1' in
the code.

Paste the following code into your worksheet's code page.
To open the code page, right click on the sheet's tab and
select the last menu item: 'View Code'


Private Sub Worksheet_Change(ByVal Target As Range)

If Target.Address = "$C$3" Then

ActiveSheet.Shapes("Oval 1").Select
Selection.Characters.Text = Target.Text


Target.Select
End If

End Sub


First the code check's that the changed cell is C3. If it
is the oval is selected, the text is changed and then the
cell is re-selected.

It's a pity, but this is one object that you have to
select for this.

Patrck Molloy
Microsoft Excel MVP


-----Original Message-----
Is it possible to link text in the Oval object (from the

Drawing toolbar) with text in a merged cell range - the
object being when a user types text in one, it appears in
the other? If so how would this be done?
.



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Automating the "Oval" Object

Select the oval

go to the formula bar

enter
=A1
and hit return.

change A1 to the upper left cell in the merged cell range.

--
Regards,
Tom Ogilvy

"Phil Hageman" wrote in message
...
Is it possible to link text in the Oval object (from the Drawing toolbar)

with text in a merged cell range - the object being when a user types text
in one, it appears in the other? If so how would this be done?


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,337
Default Automating the "Oval" Object

If I understand you
right click on the auto shape(oval) add textin the FORMULA bar type in =n3
where n3 is the first of your merged cells. Then when n3 is changed the text
will appear in the shape.

--
Don Guillett
SalesAid Software

"Phil Hageman" wrote in message
...
Is it possible to link text in the Oval object (from the Drawing toolbar)

with text in a merged cell range - the object being when a user types text
in one, it appears in the other? If so how would this be done?




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 160
Default Automating the "Oval" Object

Patrick, Tom and Don

Thanks for your input - works as desired

Phil
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
why do i "sometimes" need to "edit chart object" before "source da Flirty and Blonde Charts and Charting in Excel 1 February 2nd 10 02:07 PM
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
change "true" and "false" to "availble" and "out of stock" inthestands Excel Worksheet Functions 2 July 19th 07 07:05 PM
HELP on "left","right","find","len","substitute" functions serene83 Excel Discussion (Misc queries) 5 June 27th 06 02:23 AM
Count occurences of "1"/"0" (or"TRUE"/"FALSE") in a row w. conditions in the next BCB New Users to Excel 7 May 13th 06 10:02 PM


All times are GMT +1. The time now is 02:10 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"