Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Windows XP Pro SP
Excel 2002 SP 2 I have 17 comboboxs on Page4 of MultiPage1 on a userform. How can I loop through them to check a property without having to put 17 checks inside my loop? Thanks! -gk- -- ================================================= The creative act is not the province of remote oracles or rarefied geniuses but a transparent process that is open to everyone. -Greg Kot in Wilco Learning How To Die- |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() "42N83W" wrote in message ... Windows XP Pro SP Excel 2002 SP 2 I have 17 comboboxs on Page4 of MultiPage1 on a userform. How can I loop through them to check a property without having to put 17 checks inside my loop? Thanks! -gk- I've tried this Dim cbx As ComboBox 'also tried Dim cbx As Control For Each cbx In frmMain.fra02_01 'fra02_01 is a frame on MultiPage1(4) 'also tried For Each cbx In frmMain.MultiPage1(4) If cbx.Value = "" Then flag1 = True Next cbx I've tried other combinations besides the above, and I keep getting a "This Property is not supported" -gk- |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
42...
Something similar to the following ought to work... Dim objCB As MSForms.ComboBox For Each objCB In UserForm1.Frame1.Controls objCB.Enabled = True Next Jim Cone San Francisco, USA "42N83W" wrote in message ... "42N83W" wrote in message ... Windows XP Pro SP Excel 2002 SP 2 I have 17 comboboxs on Page4 of MultiPage1 on a userform. How can I loop through them to check a property without having to put 17 checks inside my loop? Thanks! -gk- I've tried this Dim cbx As ComboBox 'also tried Dim cbx As Control For Each cbx In frmMain.fra02_01 'fra02_01 is a frame on MultiPage1(4) 'also tried For Each cbx In frmMain.MultiPage1(4) If cbx.Value = "" Then flag1 = True Next cbx I've tried other combinations besides the above, and I keep getting a "This Property is not supported" -gk- |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() "Jim Cone" wrote in message ... 42... Something similar to the following ought to work... Dim objCB As MSForms.ComboBox For Each objCB In UserForm1.Frame1.Controls objCB.Enabled = True Next Jim Cone San Francisco, USA Now I'm getting a Type-Mismatch error. Hmmmmm -gk- "42N83W" wrote in message ... "42N83W" wrote in message ... Windows XP Pro SP Excel 2002 SP 2 I have 17 comboboxs on Page4 of MultiPage1 on a userform. How can I loop through them to check a property without having to put 17 checks inside my loop? Thanks! -gk- I've tried this Dim cbx As ComboBox 'also tried Dim cbx As Control For Each cbx In frmMain.fra02_01 'fra02_01 is a frame on MultiPage1(4) 'also tried For Each cbx In frmMain.MultiPage1(4) If cbx.Value = "" Then flag1 = True Next cbx I've tried other combinations besides the above, and I keep getting a "This Property is not supported" -gk- |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
42...
Show us the code and where the error occurs. Jim cone San Francisco, USA "42N83W" wrote in message ... "Jim Cone" wrote in message ... 42... Something similar to the following ought to work... Dim objCB As MSForms.ComboBox For Each objCB In UserForm1.Frame1.Controls objCB.Enabled = True Next Jim Cone San Francisco, USA Now I'm getting a Type-Mismatch error. Hmmmmm -gk- |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Option Explicit
Dim cbx as MSForms.ComboBox ' flag1 is a global variable Public Sub ValidateFiles() ' called from cmd02_Next_Click() in frmMain code module 'error Run Time 13 Type Mismatch occurs in the For statement For Each cbx In frmMain.fra02_01.Controls If cbx.Value = "" Then 'cbx.Text doesn't work flag1 = True End If Next cbx End Sub "Jim Cone" wrote in message ... 42... Show us the code and where the error occurs. Jim cone San Francisco, USA "42N83W" wrote in message ... "Jim Cone" wrote in message ... 42... Something similar to the following ought to work... Dim objCB As MSForms.ComboBox For Each objCB In UserForm1.Frame1.Controls objCB.Enabled = True Next Jim Cone San Francisco, USA Now I'm getting a Type-Mismatch error. Hmmmmm -gk- |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Multipage Controls - Experts Only | Excel Programming | |||
Progmatically adding controls in multipage | Excel Programming | |||
Multipage & Spinbutton controls on a form | Excel Programming | |||
Events for Controls in a Multipage Control | Excel Programming | |||
Scrollable list box demo now handles multipage controls | Excel Programming |