Use VBA to select previous shape

I wrote the following to enlarge a selected shape using VBA & contouring.

It works great, but I just cant get it to re-select the outcome so I can enlarge again with the shortcut without reselecting it.

I tried lots of code but nothing consistently re-selected the outcome.

I need to add a line at the end to select the new shape result - please help - thanks.

Dim OrigSelection As ShapeRange
Set OrigSelection = ActiveSelectionRange
Dim eff1 As Effect
Set eff1 = OrigSelection(1).CreateContour(1, 0.01, 1, 0, CreateRGBColor(0, 0, 0), CreateRGBColor(0, 0, 0), CreateRGBColor(0, 0, 0), 0, 0, 2, 4, 15#)
eff1.Contour.ContourGroup.AddToSelection
ActiveSelection.Separate
OrigSelection.Delete

Parents
  • I have a ready-to-use macro to do what I think you want to do.