Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

One procedure for a textbox array?
I need to create one procedure to control the data input into an array of
textboxes. I need it to work with an ARRAY of textboxes. Is there any way of
doing this?

Note that the textboxes are ALREADY on the userform so I can't use dynamic
addition of controls here.



--
|
+-- Thief_
|



Report this thread to moderator Post Follow-up to this message
Old Post
Thief_
05-27-05 08:55 AM


Re: One procedure for a textbox array?
You say UserForm so is this from a VBA application?

--
Chris Hanscom - Microsoft MVP (VB)
Veign's Resource Center
http://www.veign.com/vrc_main.asp
--
Read. Decide. Sign the petition to Microsoft.
http://classicvb.org/petition/


"Thief_" <thief_@hotmail.com> wrote in message
news:ezNCgmkYFHA.616@TK2MSFTNGP12.phx.gbl...
> I need to create one procedure to control the data input into an array of
> textboxes. I need it to work with an ARRAY of textboxes. Is there any way
of
> doing this?
>
> Note that the textboxes are ALREADY on the userform so I can't use dynamic
> addition of controls here.
>
>
>
> --
> |
> +-- Thief_
> |
>
>



Report this thread to moderator Post Follow-up to this message
Old Post
Veign
05-27-05 08:55 AM


Re: One procedure for a textbox array?
Sorry Veign,

I'm a VBA & VB programmer and hate having to call the same object different
names depending on which development environment I'm using! It's a VB6 app
and I just got a brain-freeze, but I got the solution anyway after sitting
back and having a coffee!

--
|
+-- Thief_
|

"Veign" <NOSPAMinveign@veign.com> wrote in message
news:ukzHwrkYFHA.584@TK2MSFTNGP15.phx.gbl...
> You say UserForm so is this from a VBA application?
>
> --
> Chris Hanscom - Microsoft MVP (VB)
> Veign's Resource Center
> http://www.veign.com/vrc_main.asp
> --
> Read. Decide. Sign the petition to Microsoft.
> http://classicvb.org/petition/
>
>
> "Thief_" <thief_@hotmail.com> wrote in message
> news:ezNCgmkYFHA.616@TK2MSFTNGP12.phx.gbl... 
of 
way
> of 
dynamic 
>
>



Report this thread to moderator Post Follow-up to this message
Old Post
Thief_
05-27-05 08:55 AM


Re: One procedure for a textbox array?
"Thief_" <thief_@hotmail.com> wrote in message
news:ezNCgmkYFHA.616@TK2MSFTNGP12.phx.gbl...
>I need to create one procedure to control the data input into an array of
> textboxes. I need it to work with an ARRAY of textboxes. Is there any way
> of
> doing this?
>
> Note that the textboxes are ALREADY on the userform so I can't use dynamic
> addition of controls here.
>
If you have an array of textboxes they automatically use the same procedure.

For example, if you want to control what key is pressed use the following
sub:

Private Sub Text1_KeyPress(Index As Integer, KeyAscii As Integer)

End Sub

Gary



Report this thread to moderator Post Follow-up to this message
Old Post
Gary Nelson
05-27-05 08:55 AM


Re: One procedure for a textbox array?
No problem - Glad you got it working.

--
Chris Hanscom - Microsoft MVP (VB)
Veign's Resource Center
http://www.veign.com/vrc_main.asp
--
Read. Decide. Sign the petition to Microsoft.
http://classicvb.org/petition/


"Thief_" <thief_@hotmail.com> wrote in message
news:uZ1aVVlYFHA.3356@TK2MSFTNGP15.phx.gbl...
> Sorry Veign,
>
> I'm a VBA & VB programmer and hate having to call the same object
different
> names depending on which development environment I'm using! It's a VB6 app
> and I just got a brain-freeze, but I got the solution anyway after sitting
> back and having a coffee!
>
> --
> |
> +-- Thief_
> |
>
> "Veign" <NOSPAMinveign@veign.com> wrote in message
> news:ukzHwrkYFHA.584@TK2MSFTNGP15.phx.gbl... 
> of 
> way 
> dynamic 
>
>



Report this thread to moderator Post Follow-up to this message
Old Post
Veign
05-27-05 08:55 AM


Re: One procedure for a textbox array?
Thanks guys,

I needed one procedure to handle the events of both single-textboxes and
array-textboxes. My solution was to create a usercontrol textbox with the
validation code in the usercontrol. I could then place single-instances or
array-instances of the control on the (user)form!

--
|
+-- Thief_
|

"Gary Nelson" <gn@nospam.com> wrote in message
news:%23BU%23%23XlYFHA.2996@TK2MSFTNGP10.phx.gbl...
>
> "Thief_" <thief_@hotmail.com> wrote in message
> news:ezNCgmkYFHA.616@TK2MSFTNGP12.phx.gbl... 
way 
dynamic 
> If you have an array of textboxes they automatically use the same
procedure.
>
> For example, if you want to control what key is pressed use the following
> sub:
>
> Private Sub Text1_KeyPress(Index As Integer, KeyAscii As Integer)
>
> End Sub
>
> Gary
>
>



Report this thread to moderator Post Follow-up to this message
Old Post
Thief_
05-27-05 08:55 AM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

Visual Basic archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 10:27 AM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.