I believe this has a simple answer but I'm having trouble setting the height of an ActiveX Control List Box. The list box is on an Excel 2013 spreadsheet and I would like to have the list box height be either 0 or 88. This is my code (the list box name is ACEI):
With ActiveSheet.Shapes("ListBoxACEI")
.Visible = True
.Top = Range("B4").Top
.ScaleHeight 0.78, msoFalse, msoScaleFromTopLeft
End With
The first two lines of code (.visible and .top) run properly. The .ScaleHeight line of code is what was recorded when I used the macro recorder to size the list box. The problem is each time the above code is run, the height of the list box gets incrementally larger by inconsistent increments. I tried setting the height using .Height 88 but get an error message "Run-time error '438": Object doesn't support this property or method.' IntegralHeight is set to True (but I have no idea what that means).
Can somebody point out my error. Many thanks in advance.
Seleseped
With ActiveSheet.Shapes("ListBoxACEI")
.Visible = True
.Top = Range("B4").Top
.ScaleHeight 0.78, msoFalse, msoScaleFromTopLeft
End With
The first two lines of code (.visible and .top) run properly. The .ScaleHeight line of code is what was recorded when I used the macro recorder to size the list box. The problem is each time the above code is run, the height of the list box gets incrementally larger by inconsistent increments. I tried setting the height using .Height 88 but get an error message "Run-time error '438": Object doesn't support this property or method.' IntegralHeight is set to True (but I have no idea what that means).
Can somebody point out my error. Many thanks in advance.
Seleseped