Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello Everyone,
Ya know how when your dealing with a bunch of text boxes in a Userform you can say: For each textboxx in Controls blaw blaw blaw The problem I am having is that I'm dealing with a sheet not a userform and there are a lot of controls on the page. is there a way to group text boxs together so I can say: For each textboxx in Group1.Controls, or something like that. Thanks for the help, Jordan |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
well, you can't say for each textbox in controls, in a userform.
you can say for each ctrl in Userform1.Controls if typeof ctrl is MSForms.Textbox then end if Next on a worksheet you can do the same Dim bx as MSForms.Textbox for each obj in Activesheet.oleObjects if typeof obj.Object is MSForms.Textbox then set bx = obj.object end if Next You could always create a collection and assign these to the collection if you want. -- Regards, Tom Ogilvy "Jordan" wrote in message ... Hello Everyone, Ya know how when your dealing with a bunch of text boxes in a Userform you can say: For each textboxx in Controls blaw blaw blaw The problem I am having is that I'm dealing with a sheet not a userform and there are a lot of controls on the page. is there a way to group text boxs together so I can say: For each textboxx in Group1.Controls, or something like that. Thanks for the help, Jordan |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks a lot Tom!!
"Tom Ogilvy" wrote: well, you can't say for each textbox in controls, in a userform. you can say for each ctrl in Userform1.Controls if typeof ctrl is MSForms.Textbox then end if Next on a worksheet you can do the same Dim bx as MSForms.Textbox for each obj in Activesheet.oleObjects if typeof obj.Object is MSForms.Textbox then set bx = obj.object end if Next You could always create a collection and assign these to the collection if you want. -- Regards, Tom Ogilvy "Jordan" wrote in message ... Hello Everyone, Ya know how when your dealing with a bunch of text boxes in a Userform you can say: For each textboxx in Controls blaw blaw blaw The problem I am having is that I'm dealing with a sheet not a userform and there are a lot of controls on the page. is there a way to group text boxs together so I can say: For each textboxx in Group1.Controls, or something like that. Thanks for the help, Jordan |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Calling name of Sheet as a Variable? | Excel Worksheet Functions | |||
User Form Text Boxes - Copy format of text boxes | Excel Discussion (Misc queries) | |||
How to add formula calling up current workbook when sheet copied | Excel Discussion (Misc queries) | |||
Calling a bit of code from a sheet errors | Excel Discussion (Misc queries) | |||
Calling Com addin from form button on sheet? | Excel Programming |