Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default help needed trying to find autoshape/shape name


hi i got a sheet which I copy and insert it at the end of the workboo
problem is that I have a rectangle which I would like text to be insid
however it changes names as soon as I copy it is there a way I could us
like a variable to do what I want with the only shape on my sheet.


Code
-------------------
Sub Macro6()

ActiveSheet.Shapes("Rectangle 1627").Select
Selection.Characters.Text = "hello world. Its" & Now()
End Sub

-------------------

--
funkymonkU
-----------------------------------------------------------------------
funkymonkUK's Profile: http://www.excelforum.com/member.php...fo&userid=1813
View this thread: http://www.excelforum.com/showthread.php?threadid=54469

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default help needed trying to find autoshape/shape name

You say you only have one shape, but you have already described having a
command button on the sheet, which is a shape as well. So I assume you know
where the shape is located:

for each shp in ActiveWorksheet.Shapes
if shp.TopLeftCell.Address = "$B$9" then
shp.TextFrame.Characters.Text = "hello world. Its" & Now()
end if
Next

--
Regards,
Tom Ogilvy


"funkymonkUK" wrote:


hi i got a sheet which I copy and insert it at the end of the workbook
problem is that I have a rectangle which I would like text to be inside
however it changes names as soon as I copy it is there a way I could use
like a variable to do what I want with the only shape on my sheet.


Code:
--------------------
Sub Macro6()

ActiveSheet.Shapes("Rectangle 1627").Select
Selection.Characters.Text = "hello world. Its" & Now()
End Sub

--------------------


--
funkymonkUK
------------------------------------------------------------------------
funkymonkUK's Profile: http://www.excelforum.com/member.php...o&userid=18135
View this thread: http://www.excelforum.com/showthread...hreadid=544699


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
Where do I find buttons to change shape to 3-D and rotate in 2007 Zagrijs Venter Excel Discussion (Misc queries) 0 April 24th 08 01:32 PM
my curser changed from arrow shape to a cross shape???? bj New Users to Excel 1 February 5th 07 02:47 PM
Is it Possible to Find Shape at a Location (#find) for XL97? JK Excel Programming 4 March 16th 06 06:15 PM
Find Autoshape Ronbo Excel Programming 6 July 12th 05 04:40 AM
Deleting a shape and the cell contents the shape is in. Tom Ogilvy Excel Programming 0 October 9th 03 03:43 AM


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