Change shape size

ralucat23

New Member
Joined
Feb 25, 2016
Messages
6
Hello,

I am trying to run the code below to automatically highlight a particular shape from a drop down list. Since i am having the point(shape) on a map I would like to change the colour to make it visible, and making the shape larger so that it stands out.
I managed to change the colour of the shape, yet I am struggling to enlarge the shape.

This is a copy of the code :
Code:
Private Sub ComboBox1_Change()
Call initial_feasability_analysis_show_all
Range("Q10").Value = ComboBox1.Text
Dim ActiveShape As shape
  On Error GoTo NoShapeSelected
    Set ActiveShape = ActiveSheet.Shapes(ComboBox1.Text)
    ActiveShape.Line.Visible = msoFalse
    ActiveShape.Fill.ForeColor.RGB = RGB(124, 252, 0) 'the colour of the selected aerodrome
  On Error Resume Next

'Do Something with your Shape variable
  MsgBox "You have selected the airport: " & ComboBox1.Text
Exit Sub

'Error Handler
NoShapeSelected:
  MsgBox "You do not have an airport selected!"

Call ActiveShape.ScaleHeight(100000, msoTrue, msoScaleFromTopLeft)
With ActiveShape
        .Left = 20000
        .Top = 20000
        .Width = 20000
        .Height = 20000
    End With

 End Sub

Can anyone help me?

Thank you
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.

Forum statistics

Threads
1,223,230
Messages
6,170,883
Members
452,364
Latest member
springate

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top