Jump to content
Xtreme .Net Talk

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


Recommended Posts

Guest Chrisis
Posted (edited)

Hello,

 

Im trying to write a little popup program which works with win2000 and xp ! Does somebody know what's 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 :

       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

Edited by PlausiblyDamp
Guest Chrisis
Posted

I'm 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

  • *Gurus*
Posted

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...

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

Guest Chrisis
Posted

Yes, that helped me !!! I'm a beginner in programming, so that Visual Basic.Net is nearly one of the first languages I've 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 didn't get it running because I've written it on a xp system and I'd 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 it's the best way to work with the message queue service ?? When yes - How ??

 

Thank you in advance

 

Chris

Guest Chrisis
Posted

Does not matter ! Thanx for your help !!!

 

best wishes

Chris

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...