Hi. You can use the following instead. Sub ControlArray(ctrl as control) if ctrl.index =1 then . . . Your Code Here . . . endif End Sub
You will not get any intellisense help when putting a .(dot) with ctrl. Surjit --- subhashini giri <[EMAIL PROTECTED]> wrote: > Thanks Don. This i know. I want to create a function > in a class which will take a control array as an > argument. > > For example LoadTextBox(xTextBox() as textbox) > > I have a text box control array defined in my form > as Text1. How do I call this function using Text1? > > I am getting error when I call teh function as > LoadTextBox(Text1). > > The error message is "Cannot call the function with > the argument....THe function expects an array.". > > > Hope this explains my problem clearly. > > > Don Roberts <[EMAIL PROTECTED]> wrote: > I'm not really sure how you are relating the control > arrays to sorting, but > here's a function that changes the background of > textboxes in a control > array when you double click on the textbox: > Private Sub Text1_DblClick(Index As Integer) > > Select Case Index > > Case 0: > Text1(Index).BackColor = vbYellow > > Case 1: > Text1(Index).BackColor = vbRed > > Case 2: > Text1(Index).BackColor = vbBlue > > Case Else: > > MsgBox "Invalid Textbox" > > End Select > End Sub > > > On 8/8/05, subhashini giri > <[EMAIL PROTECTED]> wrote: > > > > Hi all, > > Please help me out in sorting an issue in VB 6. > > How do I create a function which takes a control > array (text box or check > > box or whatever.) as an argument? > > How do i call the function with the actual > control? > > > > Hoping for areply. > > Thanks in advance, > > Subhashini > > > > > > > > --------------------------------- > > How much free photo storage do you get? Store your > friends n family photos > > for FREE with Yahoo! Photos. > > http://in.photos.yahoo.com > > > > [Non-text portions of this message have been > removed] > > > > > > > > > > > > > > > > '// > ======================================================= > > Rules : http://ReliableAnswers.com/List/Rules.asp > > Home : http://groups.yahoo.com/group/vbHelp/ > > > ======================================================= > > Post : [email protected] > > Join : [EMAIL PROTECTED] > > Leave : [EMAIL PROTECTED] > > '// > ======================================================= > > > > Yahoo! Groups Links > > > > > > > > > > > > > > > > > > > -- > Don Roberts - [EMAIL PROTECTED] > http://www.drscripting.com > http://www.robertsgenealogy.com > > > [Non-text portions of this message have been > removed] > > > > > '// > ======================================================= > Rules : > http://ReliableAnswers.com/List/Rules.asp > Home : http://groups.yahoo.com/group/vbHelp/ > > ======================================================= > Post : [email protected] > Join : [EMAIL PROTECTED] > Leave : [EMAIL PROTECTED] > '// > ======================================================= > > > > > --------------------------------- > YAHOO! GROUPS LINKS > > > Visit your group "vbhelp" on the web. > > To unsubscribe from this group, send an email > to: > [EMAIL PROTECTED] > > Your use of Yahoo! Groups is subject to the > Yahoo! Terms of Service. > > > --------------------------------- > > > > > --------------------------------- > Check out Yahoo! India Rakhi Special for Rakhi > shopping, contests and lots more. > http://in.promos.yahoo.com/rakhi/index.html > > [Non-text portions of this message have been > removed] > > > > ____________________________________________________ Start your day with Yahoo! - make it your home page http://www.yahoo.com/r/hs ------------------------ Yahoo! Groups Sponsor --------------------~--> <font face=arial size=-1><a href="http://us.ard.yahoo.com/SIG=12h6psj1q/M=362131.6882499.7825260.1510227/D=groups/S=1705115364:TM/Y=YAHOO/EXP=1124181913/A=2889191/R=0/SIG=10r90krvo/*http://www.thebeehive.org ">Get Bzzzy! (real tools to help you find a job) Welcome to the Sweet Life - brought to you by One Economy</a>.</font> --------------------------------------------------------------------~-> '// ======================================================= Rules : http://ReliableAnswers.com/List/Rules.asp Home : http://groups.yahoo.com/group/vbHelp/ ======================================================= Post : [email protected] Join : [EMAIL PROTECTED] Leave : [EMAIL PROTECTED] '// ======================================================= Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/vbhelp/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
