|
-
Jan 10th, 2002, 03:01 PM
#1
Thread Starter
Junior Member
ActiveX control w/ modal form
I've made an activex control which has a method to search a db table, and shows a modal form (part of the control project) to accept search terms. I need to run a method in the control in response to a button click on the form, but I keep getting "Sub or Function not defined" and execution crashes on the line calling the method.
Code in the form:
------------------------------------------
Private Sub cmdSearch_Click()
Dim x As String
x = DoSearch(keywords)
End Sub
------------------------------------------
Code in the control:
------------------------------------------
Public Function DoSearch(SearchFor as String)
'do the search
End Function
------------------------------------------
Tried it as an event, too--crashed on same line.
Can I not call an event in a control from a form within the control's project? Am I missing something? Please help.
Thanks!
&sylvania;
---------------------------------------
VB6:Perl:ASP:JS:HTML:English
(in that order)
MCP
-
Jan 11th, 2002, 03:19 AM
#2
Lively Member
you would need to prefix the function/sub name with the object name.
If your activex control on the form is called y then do
x = y.DoSearch(keywords)
The function itself is not really defined it is only a member function of the control
-
Jan 11th, 2002, 09:20 AM
#3
Thread Starter
Junior Member
Thank You!
Thanks so much, Andrew! Very helpful, and the method is executing.

Thanks!
&sylvania;
---------------------------------------
VB6:Perl:ASP:JS:HTML:English
(in that order)
MCP
-
Jan 15th, 2002, 12:43 AM
#4
Member
hi
will u hepl me out in making the dll to convert the text into html file in which i have one rich text box and other uttob while clicking tyhe button the text box lines shold be conerted into html file
bye
ms rajender
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|