send msg same as netsend

  • Thread starter Thread starter ilyaskazi
  • Start date Start date
I

ilyaskazi

We are using winXP 2002 and office-XP 2003.

We do work mainly in excel application. Now there is need to
communicate with our staff in network as we were doing previously in
win2000 by using its features of netsend.

Though we hv upgraded os we are unable to do so and need other
alternative through excel application to send messages in network.

I hv able to detect IP address of my machine through Colo's vba tips:
http://puremis.net/excel/code/079.shtml

In my userform it contains 2 textbox and 1 go cmdbtn.
One txtbox is to enter IP address to whom we need to send and the other
txtbox to type our messages to send.

On clicking go btn, msg should be sent as msgbox to IP address given by
me.
 
thankyou nick for that information.

but we are now working on something which we require through excel vba
to pass our work information in our fashion.

The request i made here is to simply send msg to upon which our work
depends.
 
Here is a suggestion I found in Google, but haven't tried it myself


Within VBA, ensure you add a reference to "Windows Script Host Object
Model", then you may copy and paste the following code into a new Module:


Option Explicit


Sub ExecuteNetSend()


Dim objShell As New WshShell
Dim objExec As WshExec
Dim strComputer As String
Dim strMessage As String
Dim ReadAll As String


strComputer = "ComputerNameHere"
strMessage = "Testing Net Send"


Set objExec = objShell.Exec("Net Send " & strComputer & " " & strMessage)


Do While Not objExec.StdOut.AtEndOfStream
ReadAll = objExec.StdOut.ReadAll
Loop


MsgBox ReadAll, vbInformation, "Net Send Results"

End Sub
 
Upon executing i got netsend error msg saying...
An error occured while sending a message to "Computer name"

Also note, we are unable to use netsend msg through run command.
I don't know whether this option is enabled in our computer as per nick
provided the information.

If i try using netsend through run command black screen of dos-type
comes and goes-off without sending my message.

It does not even show me any error msg, whereas executing through excel
vba i got err msg (see abv).

Well, let me know the problem or any other alternative to netsend
through vba?
 
ilyaskazi,
Does this not work on Office2003 ?

Private Sub CommandButton1_Click()
Shell ("net send " & DestinationMachine & strMessage & " ")
End Sub

NickHK
 
ilyaskazi,
After reading those acticles, have you checked that the Messenger service is
actually running ?

NickHK
 
well now i hv checked through command prompt using netsend.

It shows error msg saying...
message alias could not be found on the network.

But I hv given correct alias name, then why this occurs??
 
thankyou nick once again

the link u provided has solved my problem....
http://www.theeldergeek.com/messenger_removal.htm

messenger was disabled by default in our computers.

I hv now enabled through running "services.msc"

I also thank Bob for vba code for which our work now depends to pass
information in network computers.

thankyou all....... :)
 
Back
Top