Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 144
Default Calling Text Boxes from a sheet

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Calling Text Boxes from a sheet

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 144
Default Calling Text Boxes from a sheet

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Calling name of Sheet as a Variable? thekeytothedoor Excel Worksheet Functions 1 January 1st 10 08:48 AM
User Form Text Boxes - Copy format of text boxes NDBC Excel Discussion (Misc queries) 3 July 2nd 09 02:02 AM
How to add formula calling up current workbook when sheet copied Smudge Excel Discussion (Misc queries) 6 September 7th 07 10:40 AM
Calling a bit of code from a sheet errors gearoi Excel Discussion (Misc queries) 2 September 6th 05 08:21 PM
Calling Com addin from form button on sheet? Robin Hammond[_2_] Excel Programming 8 January 8th 05 03:03 AM


All times are GMT +1. The time now is 01:05 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"