Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27
Default Count number of textboxes

hi. anyone knows how to count the number of textboxes in a user field. i want
to create an array in which i insert the values from the textboxes. since the
number of textboxes is variable i want the length of the array to be
varaiable. therefore it would be great if you could count the number of
textboxes and then set the length of the equal to that. PLease help neede!!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 718
Default Count number of textboxes

Public Function countTextboxes(oUF As UserForm) As Long
Dim iCtrl As Long
For iCtrl = 0 To oUF.Controls.Count - 1
If TypeName(oUF.Controls(iCtrl)) = "TextBox" Then
countTextboxes = countTextboxes + 1
End If
Next iCtrl
End Function

That might be sufficient for Dimming your array, not to populate it.

HTH
--
AP

"april27" a écrit dans le message de
news: ...
hi. anyone knows how to count the number of textboxes in a user field. i
want
to create an array in which i insert the values from the textboxes. since
the
number of textboxes is variable i want the length of the array to be
varaiable. therefore it would be great if you could count the number of
textboxes and then set the length of the equal to that. PLease help
neede!!



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default Count number of textboxes

I repeat, show the code!

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"april27" wrote in message
...
hi. anyone knows how to count the number of textboxes in a user field. i

want
to create an array in which i insert the values from the textboxes. since

the
number of textboxes is variable i want the length of the array to be
varaiable. therefore it would be great if you could count the number of
textboxes and then set the length of the equal to that. PLease help

neede!!


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
Count rows and insert number to count them. Mex Excel Discussion (Misc queries) 6 August 23rd 06 02:29 AM
count each cell that have a number and take that number and count. Vick Excel Discussion (Misc queries) 3 May 19th 06 01:51 AM
Number count - postcodes and need to count the numbers of tim... Mark - Aust Excel Discussion (Misc queries) 1 October 24th 05 10:00 AM
Count number of times a specific number is displayed in a cell ran subs Excel Worksheet Functions 1 June 27th 05 05:01 PM
Count number of times a specific number is displayed in cells subs[_2_] Excel Programming 1 June 27th 05 03:15 PM


All times are GMT +1. The time now is 09:06 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"