tractorvix
Technical User
Hi all,
I'm sure I'm missing something really simple here, but it's absolutely foxing me.
I'm trying to pass a couple of values to a function to give me the option of looping. It works fine if I pass one string using the following:
Private Function SendMsg(msg As String)
MsgBox msg
End Function
Private Sub Command0_Click()
Sendmsg ("This is a test")
End Sub
But when I amend the function to 2 inputs:
Private Function SendMsg(msg As String, title As String)
MsgBox msg,,Title
End Function
and update the Command0_Click to:
Private Sub Command0_Click()
Sendmsg ("This is a test", "This is a title")
End Sub
I get a compile error 'Expected:="
I've tried MS help, but it's really not that useful!
Thanks
Vicky
I'm sure I'm missing something really simple here, but it's absolutely foxing me.
I'm trying to pass a couple of values to a function to give me the option of looping. It works fine if I pass one string using the following:
Private Function SendMsg(msg As String)
MsgBox msg
End Function
Private Sub Command0_Click()
Sendmsg ("This is a test")
End Sub
But when I amend the function to 2 inputs:
Private Function SendMsg(msg As String, title As String)
MsgBox msg,,Title
End Function
and update the Command0_Click to:
Private Sub Command0_Click()
Sendmsg ("This is a test", "This is a title")
End Sub
I get a compile error 'Expected:="
I've tried MS help, but it's really not that useful!
Thanks
Vicky