cmdwash_click has to be public in that form
then
call form1.cmdwash_click()
Printable View
cmdwash_click has to be public in that form
then
call form1.cmdwash_click()
If you have huge amounts of code under one Command Button, its really hard to follow it out. Its best if you were to split it up and in a situation like that what you could do is use
Public Function or Sub what ever is more usefull
Its the best when you split if up, its easier to understand.
no luck.. i changed it to public so it looks like
public sub cmdwash_click()
however it still doesnt work.. some error like method or data member not found
Form Code:
Public Sub Command1_Click()
MsgBox "clicked"
End Sub
Form Code End
Module Code:
Public Function ClickButton()
Call Form1.Command1_Click
End Function
Module Code End
I Hope this Helps!
it may be an idea to put the huge amound of lines in the module
and call it from your cmd.
greetz Pietor
Include a public Sub on the form, that calls cmd_click().
Then call that from the module.
This works
Public Sub ClickIt()
Form1.cmdwash.Value = True
End Sub
In Form1
Call ClickIt