#1
|
|||
|
|||
Struggling with Smart Art
Hi All !
I need to build a code (using powerpoint VBA), which will change the color of the of the selected element within the org chart smart art into red. I would be grateful if someone could help me with this !! Regards, RM |
#2
|
|||
|
|||
Code:
Sub chexSA() Dim osubshp As Shape Dim oshp As Shape On Error GoTo err Set oshp = ActiveWindow.Selection.ShapeRange(1) If Not oshp.HasSmartArt Then MsgBox "This does not look like you have a Smart Art shape selected!", vbCritical Exit Sub End If Set osubshp = ActiveWindow.Selection.ChildShapeRange(1) osubshp.Fill.ForeColor.RGB = vbRed Exit Sub err: MsgBox "Is a shape selected?", vbCritical End Sub |
#3
|
|||
|
|||
Quote:
Amazing, thanks a ton !! Appreciate your timely and accurate response ! |
#4
|
|||
|
|||
Hi John,
How do I get this code to work if the user has selected more than one node within the Org chart. Awaiting your help. |
#5
|
|||
|
|||
Code:
Sub chexSA() Dim osubshp As Shape Dim oshp As Shape On Error GoTo err Set oshp = ActiveWindow.Selection.ShapeRange(1) If Not oshp.HasSmartArt Then MsgBox "This does not look like you have a Smart Art shape selected!", vbCritical Exit Sub End If For Each osubshp In ActiveWindow.Selection.ChildShapeRange osubshp.Fill.ForeColor.RGB = vbRed Next Exit Sub err: MsgBox "Is a shape selected?", vbCritical End Sub |
#6
|
|||
|
|||
Thank you John !!
Hi John,
Amazing ! ! Thank you so much. |
Thread Tools | |
Display Modes | |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Struggling with this one. In-line Cell formatting again | TJMorgan | Excel Programming | 9 | 02-16-2017 10:37 AM |
I'm struggling to do a Vlookup in MS office 16 | LadyG | Excel | 6 | 01-26-2017 09:49 AM |
Struggling with a layout issue. Need Help, Please! | Moondoggy | Word | 2 | 08-08-2016 07:38 PM |
struggling with simple task | jayhammond | Word VBA | 3 | 03-04-2016 08:58 AM |
struggling with Excel formula | riccam87 | Excel | 1 | 05-02-2014 07:21 AM |