+ Reply to Thread
Results 1 to 3 of 3

Change Shape Text

  1. #1
    Registered User
    Join Date
    02-14-2005
    Posts
    69

    Unhappy Change Shape Text

    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

  2. #2
    Valued Forum Contributor
    Join Date
    06-16-2006
    Location
    Sydney, Australia
    MS-Off Ver
    2013 64bit
    Posts
    1,394
    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

  3. #3
    Registered User
    Join Date
    02-14-2005
    Posts
    69

    Talking Tar Muchly

    Thanks so much Mally.....

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

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

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1