|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
call a control that is on another form using an array.button on the 2nd form. The control it is suppose to call is stored in an array. I have to do this because I have alot of buttons that might have to stored. Array(0) = "Formname" Array(1) = "Commandbutton1_Click" Using a scriptcontrol I'm doing the following: temp = array(0) & "." & array(1) ScriptControl1.ExecuteStatement temp I get an object required error. The object it is referring to is the form name. Can someone tell me what I'm doing wrong or another way to do this. Thanks Mark Did you expose the form itself to the script control? If so, did you expose
it as the ACTUAL form name, or some other name? It would look something like this: ScriptControl1.AddObject "form1", form1 The "form1" in quotes is the name your script control will use, and can be different than the actual form name VB6 knows about. Show quoteHide quote "Mark" wrote: > I have 2 forms on form1 I have a button that is suppose to fire a command > button on the 2nd form. The control it is suppose to call is stored in an > array. I have to do this because I have alot of buttons that might have to > stored. > > Array(0) = "Formname" > Array(1) = "Commandbutton1_Click" > > Using a scriptcontrol I'm doing the following: > > temp = array(0) & "." & array(1) > ScriptControl1.ExecuteStatement temp > > I get an object required error. The object it is referring to is the form > name. > > Can someone tell me what I'm doing wrong or another way to do this. > > Thanks Mark > > >
Can someone please check my code? No Intellisense for items
About The Hard Disk Serial Number Choosing an Installer VB and Excel Crazy VB Convert Variant String to Double Acces Denied when calling FaxDocument Submit What considerations must be taken for app to run as a service? Lock Word window? Launch VB App with Arguments via Hyperlink |
|||||||||||||||||||||||