Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello all,
Just guess that i have 10 combobox... 5 in frame1 and the other 5 in frame2. Well, i want to do something like... code.. dim a as combobox for each a in frame1 a.enabled = false next I must do something more, may be select all objects not only comboboxes or may be do sth. But i do not now how to do only the objects which is in the frame that i want... Is there a way? Thanks.. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
i use something like this to reset all of the option buttons in frame2 on
userform1, maybe it will give you an idea Dim cntrl As Control For Each cntrl In UserForm1.Frame2.Controls If cntrl.Value = True Then cntrl.Value = False End If Next -- Gary "SupperDuck" wrote in message ... Hello all, Just guess that i have 10 combobox... 5 in frame1 and the other 5 in frame2. Well, i want to do something like... code.. dim a as combobox for each a in frame1 a.enabled = false next I must do something more, may be select all objects not only comboboxes or may be do sth. But i do not now how to do only the objects which is in the frame that i want... Is there a way? Thanks.. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks.. I will try it..
"Gary Keramidas" wrote: i use something like this to reset all of the option buttons in frame2 on userform1, maybe it will give you an idea Dim cntrl As Control For Each cntrl In UserForm1.Frame2.Controls If cntrl.Value = True Then cntrl.Value = False End If Next -- Gary "SupperDuck" wrote in message ... Hello all, Just guess that i have 10 combobox... 5 in frame1 and the other 5 in frame2. Well, i want to do something like... code.. dim a as combobox for each a in frame1 a.enabled = false next I must do something more, may be select all objects not only comboboxes or may be do sth. But i do not now how to do only the objects which is in the frame that i want... Is there a way? Thanks.. |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello,
I tried with a button... - Private Sub CommandButton4_Click() Dim kontrol As Button For Each kontrol In UserForm1.Frame2.Buttons kontrol.Enabled = False Next End Sub -- but got the error, "Object doesn't support this property or method" :( "SupperDuck" wrote: Thanks.. I will try it.. "Gary Keramidas" wrote: i use something like this to reset all of the option buttons in frame2 on userform1, maybe it will give you an idea Dim cntrl As Control For Each cntrl In UserForm1.Frame2.Controls If cntrl.Value = True Then cntrl.Value = False End If Next -- Gary "SupperDuck" wrote in message ... Hello all, Just guess that i have 10 combobox... 5 in frame1 and the other 5 in frame2. Well, i want to do something like... code.. dim a as combobox for each a in frame1 a.enabled = false next I must do something more, may be select all objects not only comboboxes or may be do sth. But i do not now how to do only the objects which is in the frame that i want... Is there a way? Thanks.. |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
you can't set a command button property to false.
an option button is either clicked, true, or not clicked false. you have to set the control to an available property, textbox1 = "", optionbutton1 = true or something like that. maybe post more code of what you're trying to do and someone will help. -- Gary "SupperDuck" wrote in message ... Hello, I tried with a button... - Private Sub CommandButton4_Click() Dim kontrol As Button For Each kontrol In UserForm1.Frame2.Buttons kontrol.Enabled = False Next End Sub -- but got the error, "Object doesn't support this property or method" :( "SupperDuck" wrote: Thanks.. I will try it.. "Gary Keramidas" wrote: i use something like this to reset all of the option buttons in frame2 on userform1, maybe it will give you an idea Dim cntrl As Control For Each cntrl In UserForm1.Frame2.Controls If cntrl.Value = True Then cntrl.Value = False End If Next -- Gary "SupperDuck" wrote in message ... Hello all, Just guess that i have 10 combobox... 5 in frame1 and the other 5 in frame2. Well, i want to do something like... code.. dim a as combobox for each a in frame1 a.enabled = false next I must do something more, may be select all objects not only comboboxes or may be do sth. But i do not now how to do only the objects which is in the frame that i want... Is there a way? Thanks.. |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On a userform, you need to work with the controls from MSForms:
Private Sub CommandButton5_Click() Dim Cont As MSForms.Control For Each Cont In UserForm1.Frame1.Controls If TypeOf Cont Is MSForms.CommandButton Then Cont.Enabled = False Next End Sub NickHK "SupperDuck" wrote in message ... Hello, I tried with a button... - Private Sub CommandButton4_Click() Dim kontrol As Button For Each kontrol In UserForm1.Frame2.Buttons kontrol.Enabled = False Next End Sub -- but got the error, "Object doesn't support this property or method" :( "SupperDuck" wrote: Thanks.. I will try it.. "Gary Keramidas" wrote: i use something like this to reset all of the option buttons in frame2 on userform1, maybe it will give you an idea Dim cntrl As Control For Each cntrl In UserForm1.Frame2.Controls If cntrl.Value = True Then cntrl.Value = False End If Next -- Gary "SupperDuck" wrote in message ... Hello all, Just guess that i have 10 combobox... 5 in frame1 and the other 5 in frame2. Well, i want to do something like... code.. dim a as combobox for each a in frame1 a.enabled = false next I must do something more, may be select all objects not only comboboxes or may be do sth. But i do not now how to do only the objects which is in the frame that i want... Is there a way? Thanks.. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
about frame and screen shot of a frame | Excel Programming | |||
Info Bridge Frame work 1.5 incompatible with 2007 Office Systems | Excel Discussion (Misc queries) | |||
How do range objects work? | Excel Programming | |||
How to attach legend frame to chart frame? | Charts and Charting in Excel | |||
MAKE WHEEL MOUSE WORK ON USER FORM FRAME WITH SCROLL BAR HELP!!!!! | Excel Programming |