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

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.

Forum statistics

Threads
1,215,657
Messages
6,126,062
Members
449,286
Latest member
Lantern

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