Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default can i send a network msg in visual basics?

I have macro's that have been created via VB in EXCEL - I have been asked to
'add' to the macro a method of notification - I know I can do the below
command via a
DOS prompt

net send 157.159.99.123 hi this is the message I am sending
net send 157.159.99.124 you to also need to recv a message

I would like to find a way to send a message such as those above to
'specific IPs ' on my net work with in the macro

is this possible? (I do not need to use the exact command as shown above
but I do need it sent to either the IP or a group )

Thanks
--
Kathy Goldie
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 860
Default can i send a network msg in visual basics?

Hi Kathy,

Kathy wrote:
I have macro's that have been created via VB in EXCEL - I have been
asked to 'add' to the macro a method of notification - I know I can
do the below command via a
DOS prompt

net send 157.159.99.123 hi this is the message I am sending
net send 157.159.99.124 you to also need to recv a message

I would like to find a way to send a message such as those above to
'specific IPs ' on my net work with in the macro

is this possible? (I do not need to use the exact command as shown
above but I do need it sent to either the IP or a group )


You should be able to pass the net send command to the Shell function:

Public Sub NetSend(rsUsername As String, _
rsMessage As String)
Shell "net send " & rsUsername & " " & Chr$(34) _
& rsMessage & Chr$(34)
End Sub

--
Regards,

Jake Marx
MS MVP - Excel
www.longhead.com

[please keep replies in the newsgroup - email address unmonitored]
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default can i send a network msg in visual basics?

I guess it's me shouwing my lack of knowledge - I do not understand the
commands
I looked around and thouoght maybe this would work
Sub test_notify()
shell (NetSend & "159.157.11.229" & hi there)
End Sub
macro's that have been created via VB in EXCEL - I have been asked to
'add' to the macro a method of notification - I know I can do the below
command via a
DOS prompt

net send 157.159.99.123 hi this is the message I am sending
net send 157.159.99.124 you to also need to recv a message

I would like to find a way to send a message such as those above to
'specific IPs ' on my net work with in the macro

is this possible? (I do not need to use the exact command as shown above
but I do need it sent to either the IP or a group )

Thanks
--
Kathy Goldie

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default can i send a network msg in visual basics?

Sorry - I hit the button to soon
I thought I might be able to run the below
Sub test_notify()
shell (NetSend & "157.159.12.123" & hi there)
End Sub

That was not working - I do not understand the comand you sent

Public Sub NetSend(rsUsername As String, _
rsMessage As String)
Shell "net send " & rsUsername & " " & Chr$(34) _
& rsMessage & Chr$(34)
End Sub

would I set it up like this
Public Sub NetSend(rsUsername As String, _
rsMessage As String)
Shell "net send " & rsUsername & "157.159.12.123 " &
& rsMessage & "hi there"
End Sub


"Kathy" wrote:

I have macro's that have been created via VB in EXCEL - I have been asked to
'add' to the macro a method of notification - I know I can do the below
command via a
DOS prompt

net send 157.159.99.123 hi this is the message I am sending
net send 157.159.99.124 you to also need to recv a message

I would like to find a way to send a message such as those above to
'specific IPs ' on my net work with in the macro

is this possible? (I do not need to use the exact command as shown above
but I do need it sent to either the IP or a group )

Thanks
--
Kathy Goldie

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 860
Default can i send a network msg in visual basics?

Hi Kathy,

Kathy wrote:
That was not working - I do not understand the comand you sent

Public Sub NetSend(rsUsername As String, _
rsMessage As String)
Shell "net send " & rsUsername & " " & Chr$(34) _
& rsMessage & Chr$(34)
End Sub

would I set it up like this
Public Sub NetSend(rsUsername As String, _
rsMessage As String)
Shell "net send " & rsUsername & "157.159.12.123 " &
& rsMessage & "hi there"
End Sub


Not quite - I gave an example of using a subroutine to accomplish the task
in order to make the code more reusable. You would leave the subroutine
alone, but you would use it in your code like this:

NetSend "157.159.12.123", "hi there"

That would send the message "hi there" to the computer on the IP address
157.159.12.123.

--
Regards,

Jake Marx
MS MVP - Excel
www.longhead.com

[please keep replies in the newsgroup - email address unmonitored]

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Visual Basics Error - Goto Shirl New Users to Excel 1 February 20th 10 10:33 PM
Visual basics Moin Excel Discussion (Misc queries) 3 November 13th 07 05:59 PM
Visual Basics - Automating Specific Sheet Names Tenaj Excel Discussion (Misc queries) 9 October 6th 05 01:51 PM
Combo box in Visual Basics tamato43 Excel Discussion (Misc queries) 1 March 29th 05 01:26 AM
Transfering Acces Tabel to Excel with Visual Basics Syrus the Virus[_3_] Excel Programming 1 January 10th 04 12:23 AM


All times are GMT +1. The time now is 07:53 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"