0

Hi,

I have a subroutine(callMe) in Module1. I want to call "callMe" in other subroutine in Form1.
I cant do it. I cant call subroutine in other subroutine.

How do i do it.

Thanks

3
Contributors
4
Replies
7
Views
10 Years
Discussion Span
Last Post by QVeen72
0

This example may help you

' In Module1

Public Sub CallMe(sValue As String)
   MsgBox "This is CallMe + " & sValue
End Sub

'In Form1

Public Sub CallToCallMe()
   CallMe "Hi"
End Sub

Private Sub Command1_Click()
   CallToCallMe
End Sub
0

Hi,

I have done it without adding "Public" word. Does it make any difference with or without it?

Thanks

0

Hi,

Yes, You have to Create the procedure as "Public" if you want to call it in other forms through out the project..

Regards
Veena

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.