+ Reply to Thread
Results 1 to 2 of 2

Adding text to a freeform shape programmatically Excel VBA

  1. #1
    Registered User
    Join Date
    09-30-2011
    Location
    Pakistan
    MS-Off Ver
    Excel 2010
    Posts
    1

    Adding text to a freeform shape programmatically Excel VBA

    Hey Guys, Can someone please help How I can add text to a smart art after it's converted to a shape.

    Steps I am doing.

    1: Add a smart art shape.

    2: Convert it to shapes.

    3: Ungroup it, and select a shape.

    4: Got selected shape in VB.

    Now i want to add text to that selected shape.

    Dim sh As Microsoft.Office.Interop.Excel.Shape = ExcelApp.ActiveWindow.Selection.ShapeRange(1)

    sh.Fill.ForeColor.RGB = RGB(255, 0, 0)

    This Fill Color statement works fine. I want to add text to that shape , Let say "Hello World"

  2. #2
    Valued Forum Contributor
    Join Date
    02-12-2011
    Location
    The Netherlands
    MS-Off Ver
    365
    Posts
    860

    Re: Adding text to a freeform shape programmatically Excel VBA

    Try this,

    Please Login or Register  to view this content.
    Harry.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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