Code Comments
Programming Forum and web based access to our favorite programming groups.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_ |
Post Follow-up to this messageYou 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_ > | > >
Post Follow-up to this messageSorry 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 > >
Post Follow-up to this message"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
Post Follow-up to this messageNo 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 > >
Post Follow-up to this messageThanks 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 > >
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread
Powered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.