Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am having a great deal of difficulty doing what appears to be a simple
task. I want to add a List Box from the Controls Toolbox and then set some variables. I am using the following code: ActiveSheet.OLEObjects.Add(ClassType:="Forms.ListB ox.1", Link:=False, _ DisplayAsIcon:=False, Left:=0, Top:=0, Width:=150, Height:= _ 200).Select With ActiveSheet.ListBox1 .ListFillRange = "F1:F10" .Font.Size = 14 .MultiSelect = fmMultiSelectMulti .Font.Name = "FuturaBlack BT" End With This will not run in a single macro or continuously. I can get it to work if a separate macro with the variables is manually started after the List Box has been put in place. When I do this, the List Box is not active until I activate and deactivate the Design Tool on the Controls Toolbox. I have tried putting in DoEvents in the macro and in functions and I am running with UpdateSheets=True. I do not want the code to run when I click on the List Box. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Comparing List A to List B and add what's missing from List B | Excel Discussion (Misc queries) | |||
create new list from list A, but with exclusions from a list B | Excel Worksheet Functions | |||
validation list--list depends on the selection of first list | New Users to Excel | |||
list 1 has 400 names List 2 has 4000. find manes from list 1 on 2 | Excel Worksheet Functions | |||
find names on list 1 in list 2. list 1 4000 names list 2 400 name | Excel Worksheet Functions |