masoud_sedighy
Registered User.
- Local time
- Today, 15:14
- Joined
- Dec 10, 2011
- Messages
- 132
I have a form, its name is "form3" there is a button on the form and click event of this button is like below:
Option Compare Database
Public Sub Command0_Click()
'DO SOME THING
End Sub
Now i wanted to call this sub from a macro, i have created a function like below and try to call sub, and defined function in macro but when i run macro i get error "sub, function, not defined"
Option Compare Database
Public Function Update_Trend_Line_by_Month()
Call Command0_Click()
End Function
Option Compare Database
Public Sub Command0_Click()
'DO SOME THING
End Sub
Now i wanted to call this sub from a macro, i have created a function like below and try to call sub, and defined function in macro but when i run macro i get error "sub, function, not defined"
Option Compare Database
Public Function Update_Trend_Line_by_Month()
Call Command0_Click()
End Function