ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How to keep comboboxes stationary (https://www.excelbanter.com/excel-programming/382240-how-keep-comboboxes-stationary.html)

Bryan44

How to keep comboboxes stationary
 
I have an application I'm building where I open (unhide) and close (hide)
sections of one worksheet to make it appear somewhat like opening and closing
a folder. I'm using a few comboboxes to provide a more visible list of
options for each as I'v set the zoom to 66% because of all of the data and
charts. I've had to go with comboboxes because the data validation feature
provides no way for me to control the font size, which in this case at 66% is
way too small to read. My problem is that when I first draw the comboboxes
the are in the right place. However, when I close Excel and reopen the
workbook the comboboxes have been placed much lower on the worksheet
'automagically' by Excel without me telling Excel where to put them.

So, my question is, "is there a feature or method to keep each combobox
locked in position over the cell that it represents?" Currently, I have even
tried telling Excel exactly where to put them but that doesn't work either
(example below).

With Sheetname.ComboBoxName_cb
.Left = 747
.Width = 144.75
.Top = 124.5
.Height = 19.5
.AddItem "Selection 1"
.AddItem "Selection 2"
.AddItem "Selection 3"
.AddItem "Selection 4"
End With

Has any one else run into this?

Sincerely,

Bryan44




All times are GMT +1. The time now is 08:32 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com