|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Detecting Control Array VB6controls automátically? For example, in a form I can have one commando button an two textboxes: Command1 Text1(0) Text1(1) If I use IsArray instruction I get false in both. Command1 doesn't have the Count property butText 1 does. If I test for the count property on Command1, I get an Error. Should I test the error Message? Rick -- Thanks, Rick. "For every problem, there is a solution that is simple, neat, and wrong." H. L. Mencken" =?Utf-8?B?Umljaw==?= <R***@discussions.microsoft.com> wrote in
Show quoteHide quote news:D422EDEB-18E9-442E-A46F-C15681103DDB@microsoft.com: Test for Text1.Index ? and trap errors as necessary ?> How do I detect when an ActiveX control in a form is part of an Array > of controls automátically? > > For example, in a form I can have one commando button an two > textboxes: > > Command1 > Text1(0) > Text1(1) > > If I use IsArray instruction I get false in both. Command1 doesn't > have the Count property butText 1 does. > > If I test for the count property on Command1, I get an Error. > Should I test the error Message? > > Rick "Rick" <R***@discussions.microsoft.com> wrote in message Ooh, is a commando button one that shoots back at you? :-)news:D422EDEB-18E9-442E-A46F-C15681103DDB@microsoft.com... > For example, in a form I can have one commando button an two textboxes: "Dave O." <nob***@nowhere.com> wrote in message "Get down!"news:eoiGKbXqJHA.4516@TK2MSFTNGP02.phx.gbl... >> For example, in a form I can have one commando button an two textboxes: > > Ooh, is a commando button one that shoots back at you? :-) "Follow me if you want to live!" "Get your ass to Mars." On Fri, 20 Mar 2009 16:12:34 -0000, "Dave O." <nob***@nowhere.com> No. It's a button that dislikes confinement. :)wrote: >Ooh, is a commando button one that shoots back at you? :-) J. Jeremiah D. Seitz Omega Techware http://www.omegatechware.net
Show quote
Hide quote
"Rick" <R***@discussions.microsoft.com> wrote in message Search for IsControlArray() in Goggle groups.news:D422EDEB-18E9-442E-A46F-C15681103DDB@microsoft.com... > How do I detect when an ActiveX control in a form is part of an Array of > controls automátically? > > For example, in a form I can have one commando button an two textboxes: > > Command1 > Text1(0) > Text1(1) > > If I use IsArray instruction I get false in both. Command1 doesn't have > the > Count property butText 1 does. > > If I test for the count property on Command1, I get an Error. > Should I test the error Message?
Show quote
Hide quote
"Nobody" <nob***@nobody.com> wrote in message Does this mean Google groups but you have to wear goggles?news:e2zIfdXqJHA.5280@TK2MSFTNGP02.phx.gbl... > "Rick" <R***@discussions.microsoft.com> wrote in message > news:D422EDEB-18E9-442E-A46F-C15681103DDB@microsoft.com... >> How do I detect when an ActiveX control in a form is part of an Array of >> controls automátically? >> >> For example, in a form I can have one commando button an two textboxes: >> >> Command1 >> Text1(0) >> Text1(1) >> >> If I use IsArray instruction I get false in both. Command1 doesn't have the >> Count property butText 1 does. >> >> If I test for the count property on Command1, I get an Error. >> Should I test the error Message? > > Search for IsControlArray() in Goggle groups. > > Galen
Show quote
Hide quote
"Galen Somerville" <galen@community.nospam> wrote in message Do commandos wear goggles?news:ejbkJnXqJHA.5832@TK2MSFTNGP06.phx.gbl... > > "Nobody" <nob***@nobody.com> wrote in message > news:e2zIfdXqJHA.5280@TK2MSFTNGP02.phx.gbl... >> "Rick" <R***@discussions.microsoft.com> wrote in message >> news:D422EDEB-18E9-442E-A46F-C15681103DDB@microsoft.com... >>> How do I detect when an ActiveX control in a form is part of an Array of >>> controls automátically? >>> >>> For example, in a form I can have one commando button an two textboxes: >>> >>> Command1 >>> Text1(0) >>> Text1(1) >>> >>> If I use IsArray instruction I get false in both. Command1 doesn't have >>> the >>> Count property butText 1 does. >>> >>> If I test for the count property on Command1, I get an Error. >>> Should I test the error Message? >> >> Search for IsControlArray() in Goggle groups. >> >> > Does this mean Google groups but you have to wear goggles? "Bob Butler" <noway@nospam.ever> wrote in message Yes, but they do nothing.news:%23r2tYvYqJHA.1736@TK2MSFTNGP04.phx.gbl... >>> Search for IsControlArray() in Goggle groups. >>> >>> >> Does this mean Google groups but you have to wear goggles? > > Do commandos wear goggles? On Fri, 20 Mar 2009 14:49:50 -0400, "Jeff Johnson" <i.get@enough.spam> Is there something in the air today? Good to see some humor herewrote: >Yes, but they do nothing. again! J. Jeremiah D. Seitz Omega Techware http://www.omegatechware.net
Show quote
Hide quote
"Jeremiah D. Seitz" <jse***@omegatechware.net> skrev i meddelandet Yepp, they are about to get winter in Aus....news:cau7s4tdaep14ah5mh7b929773cojvphkg@4ax.com... > On Fri, 20 Mar 2009 14:49:50 -0400, "Jeff Johnson" <i.get@enough.spam> > wrote: > >>Yes, but they do nothing. > > Is there something in the air today? Good to see some humor here > again! > > J. > Jeremiah D. Seitz > Omega Techware > http://www.omegatechware.net /Henning On Fri, 20 Mar 2009 23:17:28 +0100, "Henning"
<computer_h***@coldmail.com> wrote: >Yepp, they are about to get winter in Aus.... Probably the first time I was rightfully glad to be in the US. Springhere ... <ahhhh> Enjoy whatever season it is where you are ... unless you're in Australia. In that case, I've got a spare room, but it'll cost you a few thousand lines of code. :) >/Henning J.Jeremiah D. Seitz Omega Techware http://www.omegatechware.net "Jeremiah D. Seitz" <jse***@omegatechware.net> skrev i meddelandet That seems sheep, and affordable. It is the cost to get there from Sweden news:0sv8s450i0icfjp61i14uh7ore9feh3bu9@4ax.com... > On Fri, 20 Mar 2009 23:17:28 +0100, "Henning" > <computer_h***@coldmail.com> wrote: > >>Yepp, they are about to get winter in Aus.... > > Probably the first time I was rightfully glad to be in the US. Spring > here ... <ahhhh> > > Enjoy whatever season it is where you are ... unless you're in > Australia. In that case, I've got a spare room, but it'll cost you a > few thousand lines of code. :) that say I cant use the offer. ;) /Henning "Galen Somerville" <galen@community.nospam> wrote in message Only if you use their toolbar or software:news:ejbkJnXqJHA.5832@TK2MSFTNGP06.phx.gbl... > > "Nobody" <nob***@nobody.com> wrote in message > news:e2zIfdXqJHA.5280@TK2MSFTNGP02.phx.gbl... > >> Search for IsControlArray() in Goggle groups. >> >> > Does this mean Google groups but you have to wear goggles? > > Galen http://www.theregister.co.uk/2006/09/03/google_eavesdropping_software/ > How do I detect when an ActiveX control in a form is part of an Array of This link should help you out...> controls automátically? > > For example, in a form I can have one commando button an two textboxes: > > Command1 > Text1(0) > Text1(1) http://www.codenewsgroups.net/group/microsoft.public.vb.general.discussion/topic5126.aspx -- Rick (MVP - Excel) Or this link...
http://vbnet.mvps.org/code/helpers/iscontrolinarray.htm -- Show quoteHide quoteRick (MVP - Excel) "Rick Rothstein" <rick.newsNO.SPAM@NO.SPAMverizon.net> wrote in message news:u9hyJm3qJHA.5452@TK2MSFTNGP02.phx.gbl... >> How do I detect when an ActiveX control in a form is part of an Array of >> controls automátically? >> >> For example, in a form I can have one commando button an two textboxes: >> >> Command1 >> Text1(0) >> Text1(1) > > This link should help you out... > > http://www.codenewsgroups.net/group/microsoft.public.vb.general.discussion/topic5126.aspx > > -- > Rick (MVP - Excel) "Rick Rothstein" <rick.newsNO.SPAM@NO.SPAMverizon.net> wrote in message Strange to see the credits given to that solution:news:%23BD42r3qJHA.3648@TK2MSFTNGP05.phx.gbl... > Or this link... > > http://vbnet.mvps.org/code/helpers/iscontrolinarray.htm > http://groups.google.com/group/microsoft.public.vb.general.discussion/msg/80c615877b21ee7e?dmode=source "Bill McCarthy" <TPASoft.com Are Identity Thieves> wrote in message It may have stemmed from this thread which took place a month earlier than news:el2UUiHrJHA.3864@TK2MSFTNGP02.phx.gbl... > > "Rick Rothstein" <rick.newsNO.SPAM@NO.SPAMverizon.net> wrote in message > news:%23BD42r3qJHA.3648@TK2MSFTNGP05.phx.gbl... >> Or this link... >> >> http://vbnet.mvps.org/code/helpers/iscontrolinarray.htm >> > Strange to see the credits given to that solution: > > http://groups.google.com/group/microsoft.public.vb.general.discussion/msg/80c615877b21ee7e?dmode=source the one you cited... http://groups.google.com/group/microsoft.public.vb.general.discussion/browse_thread/thread/390423abb6526b87/d85749736560dd0b?hl=en&q=group:microsoft.public.vb.general.discussion+author:rothstein -- Rick (MVP - Excel) "Rick Rothstein" <rick.newsNO.SPAM@NO.SPAMverizon.net> wrote
http://groups.google.com/group/microsoft.public.vb.general.discussion/browse_thread/thread/390423abb6526b87/d85749736560dd0b?hl=en&q=group:microsoft.public.vb.general.discussion+author:rothstein
> It may have stemmed from this thread which took place a month earlier than > the one you cited... You guys can quibble over ownership of that TypeName method, I liked Bob's solution. But, here's a new one, (let's really screw with their heads....) Function IsArrayMember(Obj As Variant) As Boolean IsArrayMember = (VarType(Obj) <> VarType(Controls(Obj.Name))) End Function ;-) LFS Hi Rick,
Show quoteHide quote "Rick Rothstein" <rick.newsNO.SPAM@NO.SPAMverizon.net> wrote in message yes and in that you are shown your proposed method of iterating didn't work. news:Ocz75wIrJHA.5912@TK2MSFTNGP02.phx.gbl... > "Bill McCarthy" <TPASoft.com Are Identity Thieves> wrote in message > news:el2UUiHrJHA.3864@TK2MSFTNGP02.phx.gbl... >> >> "Rick Rothstein" <rick.newsNO.SPAM@NO.SPAMverizon.net> wrote in message >> news:%23BD42r3qJHA.3648@TK2MSFTNGP05.phx.gbl... >>> Or this link... >>> >>> http://vbnet.mvps.org/code/helpers/iscontrolinarray.htm >>> >> Strange to see the credits given to that solution: >> >> http://groups.google.com/group/microsoft.public.vb.general.discussion/msg/80c615877b21ee7e?dmode=source > > It may have stemmed from this thread which took place a month earlier than > the one you cited... > > http://groups.google.com/group/microsoft.public.vb.general.discussion/browse_thread/thread/390423abb6526b87/d85749736560dd0b?hl=en&q=group:microsoft.public.vb.general.discussion+author:rothstein > Then when you saw my answer a month later, after initially arguing it with me, you then posted : http://groups.google.com/group/microsoft.public.vb.general.discussion/msg/80c615877b21ee7e?dmode=source <quote> My apologies (maybe I got thrown by the typo), but . . . YOUR SOLUTION WORKS PERFECTLY. Thank you. That's what I love about these news groups, there is always someone out there who can provide an answer to a question. For some reason, this particular question has always presented a blind spot to me. I thought I looked into, and I thought didn't find a solution in, the Controls collection back when I first ran into this particular problem. Obviously, I missed it then and never thought to look at it again. Thanks again. </quote> I think you pretty clearly state you didn't find a solution, and as far as I know mine was the first ever posted solution to that problem. Hence the attribution on Randy's site still seems quite puzzling ;)
Rubberband Line with ScrollBar
Active X and Vista Why there is a limit of 65,536 bytes when writing to file? Value > Long Data Type Knowing what launched an EXE that used CreateProcess()? ShellExecute to html file in VB.net VB 6 IDE on 64-bit Windows ACCURACY of making templates on a printer Error 440 or 3021 VB .Net General Help |
|||||||||||||||||||||||