Prev: show and hide a drop down list
Next: sumif
From: sam on 22 Mar 2010 16:28 Hi All, How do I locate objects on userform based on the VBA code? For eg: I have some events like StudentYes_Click and StudentNo_Click in the VBAProject and there is some code in those events. I tried Debug --> Compile but didnt get any compile errors. So I am assuming I have those two radio buttons somewhere on the userform, But I am not able to find them. Is there a way to resolve this? how do I find those two radio buttons? Thanks in advance
From: Gary Brown on 22 Mar 2010 16:40 In the Visual Basic Editor (VBE), open the form. Select F4 to view the Propeties Window. Left-click anywhere within the form. The Properties Window will show the name of the object you clicked on in the form. Now, open the Dropdown in the Properties Window next to the name of the object you clicked on. Search for 'Student_Yes' and 'StudentNO'. Click on one of them. It will be highlighted on the form. -- Hope this helps. If it does, please click the Yes button. Thanks in advance for your feedback. Gary Brown "sam" wrote: > Hi All, > > How do I locate objects on userform based on the VBA code? > > For eg: I have some events like StudentYes_Click and StudentNo_Click in the > VBAProject and there is some code in those events. I tried Debug --> Compile > but didnt get any compile errors. So I am assuming I have those two radio > buttons somewhere on the userform, But I am not able to find them. > > Is there a way to resolve this? how do I find those two radio buttons? > > Thanks in advance
From: john on 23 Mar 2010 05:02 sam, see if this helps. code goes behind your form Dim ctl As Control For Each ctl In Me.Controls ctl.Visible = True MsgBox ctl.Name Next -- jb "sam" wrote: > Hi All, > > How do I locate objects on userform based on the VBA code? > > For eg: I have some events like StudentYes_Click and StudentNo_Click in the > VBAProject and there is some code in those events. I tried Debug --> Compile > but didnt get any compile errors. So I am assuming I have those two radio > buttons somewhere on the userform, But I am not able to find them. > > Is there a way to resolve this? how do I find those two radio buttons? > > Thanks in advance
|
Pages: 1 Prev: show and hide a drop down list Next: sumif |