I added a FormControl
ListBox
with the name ListBox2
to an Excel worksheet and I assigned a Macro RectangleRoundedCorners3_Click
to a shape. Now I would like to print the first item of the list box into cell A1:
Sub RectangleRoundedCorners3_Click()
ActiveSheet.Range("A1").Value = ActiveSheet.ListBox1.List(0)
End Sub
I get the following error:
Run-time error '438':
Object doesn't support this property or method
I don't really understand why this happens. If I use an ActiveX Controls
ListBox
the exact same code works perfectly fine.