Net Send to User III

I have this working but how can I show the user that it was sent from instead of the computername?

Private sub Comman1_Click()
 Shell "cmd /c net send " & Text1.Text & " " & Text2.Text
 Text1.Text = ""
 Text2.Text = ""
End Sub
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

The only way to do that is to just send a "FROM: Whomever" with the body of the message.  You could change the computer name of the compouter to your name but that requires a reboot.

Shell "cmd /c net send " & " \\NATALIA" & Text1.Text & " " & Text2.Text
Text1.Text = vbNullString
Text2.Text = vbNullString 'this is faster...

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
let me correct my typo...
Shell "cmd /c net send " & Text1.Text & " From: NATALIA -" & " " & Text2.Text
You can also mess around with the Net Name command

Net name              list current net send users
Net name /ADD BOB
Net name /DELETE BOB
CMILLER, I take it your using Windows Messenger, I created some Late Binding to control Windows Messenger itsef if you ever want to use this in the future you may.
All you need to do is copy/paste all the code below into a module (.BAS)

Option Explicit
'Windows Messenger Online Status Constants
Public Enum eglMicrosoftMessenger       '\\ Microsoft Windows Messenger
        eglOnlineStatus = 1             'Checks your online status
        eglMySigninName = 2             'Returns your messenger sign in name
        eglMyFriendlyName = 3           'Returns your messenger friendly name
        eglMyServiceName = 4            'Returns service name (.NET)
        eglAutoSignIn = 5               'Signs into messenger automatically (Must have remember password checked)
        eglSignOut = 6                  'Disconnect or Sign out of messenger
        eglInstantMessage = 7           'Open instant messenge
        eglAddContact = 8               'Adds a contact
        eglSendMail = 9                 'Opens default mail application and inserts e-mail address
        eglOpenInbox = 10               'Opens default mail application and check the Inbox
        eglReceiveFileDirectory = 11    'Messenger recieved file directory
        eglSendFile = 12                'Send a file to a contact
End Enum
Dim MMessenger As Object

Public Sub eglMSNMessenger(eglMsnger As eglMicrosoftMessenger, Optional bstrString As String = vbNullString, Optional strSendFile As String = vbNullString)
'WARNING: Some of the calls will not work if you don't specify someone who is on your contact list!
On Error GoTo objLateBindErr
Set MMessenger = CreateObject("Messenger.UIAutomation")

Select Case eglMsnger

    Case 1
If MMessenger.MyStatus = MISTATUS_OFFLINE Then Debug.Print "OFFLINE"
If MMessenger.MyStatus = MISTATUS_AWAY Then Debug.Print "AWAY"
If MMessenger.MyStatus = MISTATUS_BUSY Then Debug.Print "BUSY"
If MMessenger.MyStatus = MISTATUS_IDLE Then Debug.Print "IDLE"
If MMessenger.MyStatus = MISTATUS_BE_RIGHT_BACK Then Debug.Print "BE RIGHT BACK"
If MMessenger.MyStatus = MISTATUS_INVISIBLE Then Debug.Print "INVISIBLE"
If MMessenger.MyStatus = MISTATUS_ONLINE Then Debug.Print "ONLINE"
    Case 2
Debug.Print MMessenger.MySigninName
    Case 3
Debug.Print MMessenger.MyFriendlyName
    Case 4
Debug.Print MMessenger.MyServiceName
    Case 5
MMessenger.AutoSignin           '\\ NOTE: You must have your username and password remembered for this to work.
    Case 6
    Case 7
MMessenger.InstantMessage (bstrString)
    Case 8
MMessenger.AddContact 0, (bstrString)
    Case 9
MMessenger.SendMail (bstrString)
    Case 10
    Case 11
Debug.Print MMessenger.ReceiveFileDirectory
    Case 12
MMessenger.SendFile (bstrString), (strSendFile)
End Select
Set MMessenger = Nothing
Debug.Print Err.Number & "   " & Err.Description
Set MMessenger = Nothing
'Microsft Windows Messenger: USAGE: msmsgs.exe/3
'Call eglMSNMessenger(eglAddContact, "")
'Call eglMSNMessenger(eglAutoSignIn)
'Call eglMSNMessenger(eglInstantMessage, "")
'Call eglMSNMessenger(eglMyFriendlyName)
'Call eglMSNMessenger(eglMyServiceName)
'Call eglMSNMessenger(eglMySigninName)
'Call eglMSNMessenger(eglOnlineStatus)
'Call eglMSNMessenger(eglOpenInbox)
'Call eglMSNMessenger(eglReceiveFileDirectory)
'Call eglMSNMessenger(eglSendFile, "", "c:\windows\system32\calc.exe")
'Call eglMSNMessenger(eglSendMail, "")
'Call eglMSNMessenger(eglSignOut)
End Sub
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.