.Net Error : object variable or withblockvariable not set & Popup-program

  • Thread starter Thread starter Chrisis
  • Start date Start date
C

Chrisis

Guest
Hello,

Im trying to write a little popup program which works with win2000 and xp ! Does somebody know whats the best way to do this ?? I thougt about to use the windows integrated "net send" to realize my idea but i also want to have a request if the message arrived or not !!!

Here is my actual problem by programming the optic :
Code:
        Dim XXListItems As Integer
        Dim XXCount As Integer
        Dim XXGetItem As ListBox.ObjectCollection
        Dim XXListContents As Integer
        XXListContents = lisPersonList.Items.Count
        MsgBox(XXListContents)
        Dim XXItem As Array()

        If Not txtUserName.Text = "" And Not txtPcName.Text = "" Then

            XXListItems = lisPersonList.Items.Count()

            If XXListItems = 0 Then

                lisPersonList.Items.Add(txtUserName.Text)
                XXPcName(XXCounter) = txtPcName.Text & "#" & txtUserName.Text & ","
                XXCounter = XXCounter + 1
                Exit Sub

            End If

            XXGetItem = lisPersonList.Items

            For XXCount = 0 To XXListItems - 1

                XXItem(XXCount) = XXGetItem.Item(XXCount) <----------

            Next XXCount
The marked code line occurs the error : "object variable or withblock variable not set" ! I need help !!!

Thanks

Chrisis
 
Last edited by a moderator:
Im trying to create an Array which contains all the items of a Listbox(Strings). In my Programm this items are the usernames which I want to use to beard the other PCs in the Network !

Is ist now possible for you to help me ???

Thanks in advance

Christian
 
What you are doing seems so complex that I really am not sure
what you really want. If all you want to do it put the values from
the listbox into an array, it could be...
Code:
Dim XXItem() As String
Dim XXCount As Integer 

ReDim XXItem(lisPersonList.Items.Count() )
For XXCount = 0 To lisPersonList.Items.Count()
  XXItem(XXCount) = lisPersonList.Items(XX)
Next XXCount
 
Yes, that helped me !!! Im a beginner in programming, so that Visual Basic.Net is nearly one of the first languages Ive to learn in my new job as an computer engineer. I would also be very happy if you can give me a hint how to realize my problem with sending messages trough the network ?!? I also tried the message queuing but I didnt get it running because Ive written it on a xp system and Id liked to create the "server-queue" on a win 2000 system !!!?!?! Now I try to find another possibility for example the in my original question mentioned "net send" or something completely else !!! Or do you think its the best way to work with the message queue service ?? When yes - How ??

Thank you in advance

Chris
 
Back
Top