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 :
Can anyone help me?
Thank you
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