net send question

  • Thread starter Thread starter Joseph Schwartz
  • Start date Start date
J

Joseph Schwartz

I have made a test VB6 app as folows:

Private Sub Command1_Click()
Dim ip As String
Dim msg As String
ip = "Gateway"
msg = "hey how are you"
Shell ("net send" & ip & " " & msg)
End Sub


The problem is when I run this I see a little dos icon flash by but no
message is received.
On the other hand it works fine from the command line?

Any ideas as to how to get this to work?

Thanks
Joe
 
Joseph Schwartz said:
I have made a test VB6 app as folows:

You should ask in one of the VB6 groups next time because this is a VB.Net
group: microsoft.public.vb.*
Private Sub Command1_Click()
Dim ip As String
Dim msg As String
ip = "Gateway"
msg = "hey how are you"
Shell ("net send" & ip & " " & msg)
End Sub


The problem is when I run this I see a little dos icon flash by but
no message is received.
On the other hand it works fine from the command line?

Any ideas as to how to get this to work?

Have a look at the string you pass to the Shell function. Watch the
blanks...


--
Armin

How to quote and why:
http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html
 
* "Joseph Schwartz said:
I have made a test VB6 app as folows:

Private Sub Command1_Click()
Dim ip As String
Dim msg As String
ip = "Gateway"
msg = "hey how are you"
Shell ("net send" & ip & " " & msg)

There is a 'Call' missing in front of the 'Shell'.
On the other hand it works fine from the command line?

This is a VB.NET language group. You may want to post to one of the
microsoft.public.vb.* groups.
 
Back
Top