PC Review


Reply
Thread Tools Rate Thread

Change Shape Text

 
 
rhani111
Guest
Posts: n/a
 
      14th Jul 2006

Hi All,

I hope someone can help cause I'm pulling my hair out .......grrrr

I have a button that when clicked changes the text on the button to a
cell reference...no problems there.....BUT I cannot seem to get the
alternative text (if the cell reference is blank) to show up...

Here is what I have so far...

Dim shp As Shape
Set shp = ActiveSheet.Shapes("Button 415")
sText = Sheet27.Range("C1").Text
shp.TextFrame.Characters.Text = sText
If Sheet27.Range("C1").Text <> "" Then
On Error Resume Next
shp.TextFrame.Characters.Text = "My Button"

can someone help PLEASE??? wahhhhhhhh


--
rhani111
------------------------------------------------------------------------
rhani111's Profile: http://www.excelforum.com/member.php...o&userid=19940
View this thread: http://www.excelforum.com/showthread...hreadid=561326

 
Reply With Quote
 
 
 
 
Mallycat
Guest
Posts: n/a
 
      14th Jul 2006

I think this
If Sheet27.Range("C1").Text <> "" Then
On Error Resume Next
shp.TextFrame.Characters.Text = "My Button"


should be this
If Sheet27.Range("C1").Text = "" Then
shp.TextFrame.Characters.Text = "My Button"
end if

I haven't tested it though


--
Mallycat
------------------------------------------------------------------------
Mallycat's Profile: http://www.excelforum.com/member.php...o&userid=35514
View this thread: http://www.excelforum.com/showthread...hreadid=561326

 
Reply With Quote
 
rhani111
Guest
Posts: n/a
 
      14th Jul 2006

Thanks so much Mally.....

I had finally worked it out for myself....

Took forever for me to find the answer....but I got it..

--
rhani11
-----------------------------------------------------------------------
rhani111's Profile: http://www.excelforum.com/member.php...fo&userid=1994
View this thread: http://www.excelforum.com/showthread.php?threadid=56132

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Change the Shape of Text Placeholders? Christine Microsoft Powerpoint 4 8th Sep 2009 05:38 PM
PowerPoint: Change the text in a text type shape via automation Dale Fye Microsoft Powerpoint 3 12th Mar 2008 11:40 AM
Re: Change text in rectangle shape Tom Ogilvy Microsoft Excel Programming 0 23rd Jan 2007 01:03 AM
RE: Change text in rectangle shape =?Utf-8?B?Q2Fyb2xlIE8=?= Microsoft Excel Programming 0 23rd Jan 2007 12:36 AM
Re: Change text in rectangle shape Don Guillett Microsoft Excel Programming 0 22nd Jan 2007 11:54 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:58 AM.