|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
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. -- Show quoteHide quote| +-- Thief_ | You say UserForm so is this from a VBA application?
-- Show quoteHide quoteChris 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_" <thi***@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_ > | > > 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! -- Show quoteHide quote| +-- 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_" <thi***@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_ > > | > > > > > > No problem - Glad you got it working.
-- Show quoteHide quoteChris 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_" <thi***@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... > > 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_" <thi***@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_ > > > | > > > > > > > > > > > > "Thief_" <thi***@hotmail.com> wrote in message If you have an array of textboxes they automatically use the same procedure.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. > 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 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! -- Show quoteHide quote| +-- Thief_ | "Gary Nelson" <gn@nospam.com> wrote in message news:%23BU%23%23XlYFHA.2996@TK2MSFTNGP10.phx.gbl... > > "Thief_" <thi***@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 > >
Generate email from user
Correct way to get random results with arrays VB6 vs VB.net compatibility How do you make child sub-commands visible in DataReport controls? Restore Form to Prior State How do I put the focus back in a text box Releasing lock on MDB file after DataReport1 closes Can VB6 & VB.net co-exist How do your read selected values from a BOUND ListBox in VB.Net Help on char or string var |
|||||||||||||||||||||||