Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Can you have an Array of Controls that are located in different Frames on a
UserForm? Here is the code that I have and I am getting an Run Time Error: Type Mismatch. For Each Control In Controls(Array("cboAreaP", "cboAreaV", "cboAreaD", _ "cboSingle", "cboDouble", "cboDebossed")) With Control .AddItem "25%" .AddItem "50%" .AddItem "75%" .AddItem "100%" End With Next Control |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Can you have an Array of Controls that are located in different Frames on
a UserForm? Here is the code that I have and I am getting an Run Time Error: Type Mismatch. For Each Control In Controls(Array("cboAreaP", "cboAreaV", "cboAreaD", _ "cboSingle", "cboDouble", "cboDebossed")) With Control .AddItem "25%" .AddItem "50%" .AddItem "75%" .AddItem "100%" End With Next Control Try your For Each statement this way and see if that works... For Each Control In Array(cboAreaP, cboAreaV, cboAreaD, _ cboSingle, cboDouble, cboDebossed) Rick |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Try something like this.......on UserForm code sheet
For Each C In Array("cboAreaP", "cboAreaV", "cboAreaD", "cboSingle", "cboDouble", "cboSingle", "cboDouble","cboDebossed") With Me.Controls(C) .AddItem "25%" .AddItem "50%" .AddItem "75%" .AddItem "100%" End With Next -- Regards, Nigel "RyanH" wrote in message ... Can you have an Array of Controls that are located in different Frames on a UserForm? Here is the code that I have and I am getting an Run Time Error: Type Mismatch. For Each Control In Controls(Array("cboAreaP", "cboAreaV", "cboAreaD", _ "cboSingle", "cboDouble", "cboDebossed")) With Control .AddItem "25%" .AddItem "50%" .AddItem "75%" .AddItem "100%" End With Next Control |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Inserting Values in a Multidimensional Array from Two Different Controls | Excel Programming | |||
array of userform controls | Excel Programming | |||
Event procedures for controls added with Controls.Add | Excel Programming | |||
renaming array of controls | Excel Programming | |||
excel VBA set array controls | Excel Programming |