[RESOLVED] Invalid Procedure Call Or Argument Stupid Error
For some reason I receive an error when running the following code:
VB Code:
lstSites.AddItem Left(Bookmarks(i), DelimPoint)
I know that its out of context but I am sure that there is a simple way to sort this out. DelimPoint is a valid integer that is less than the length of Bookmarks(i).
Any help would be appreciated,
If I helped you out, please consider adding to my reputation!
-- "The faulty interface lies between the chair and the keyboard" --
Re: Invalid Procedure Call Or Argument Stupid Error
Ok, thanx 4 the tip, I replaced all the 'Left's with Left$
erm, the code is kinda in the middle of everything, I'll try give you an idea of it.
Ahh, screw it. I'll post my project here.
Its going to be a sort of Personal Assistant to help the user with tasks.
The error I am receiving occurs on frmSiteMonitor (Which is meant to import the bookmarks from Firefox and then alert the user when a site is updated)
I havent yet coded most of it, I am receiving the error when the program loads saved bookmarks so you will need to import your firefox bookmarks and then exit the program (click the 'x' in the program so that it can use its Form_Unload to save the bookmarks)
Once you've done that open the program again and it should freeze up or give you the error.
The error occurs in frmSiteMonitor Form_Load()
ps: Do you have MSN where we can chat easier?
Thanx,
If I helped you out, please consider adding to my reputation!
-- "The faulty interface lies between the chair and the keyboard" --
Re: Invalid Procedure Call Or Argument Stupid Error
I dont have Firefox nor MSN , but this way others can see the posts and kick in with suggestions.
You forgot to upload the project, but in any case, you can just post the Form_Load event in which the error occurs and I will check it out.
Regarding the Left, same goes for other stuff like Right$, Mid$ and so on. a lot of functions have the variant and string version.
Re: Invalid Procedure Call Or Argument Stupid Error
Oh I forgot, you need to skip the main form when doing all of the above things so use the menu on frmMain to go to the Site Monitor Form and then do what I said above.
Thanx,
If I helped you out, please consider adding to my reputation!
-- "The faulty interface lies between the chair and the keyboard" --
Re: Invalid Procedure Call Or Argument Stupid Error
I have not viewed the code or entire but what I dowbt the problem is that Bookmarks(i) is a null value.
Just confirm that Bookmarks(i) is not null when the error occurs.
Pradeep
Pradeep, Microsoft MVP (Visual Basic) Please appreciate posts that have helped you by clicking icon on the left of the post.
"A problem well stated is a problem half solved." — Charles F. Kettering
Re: Invalid Procedure Call Or Argument Stupid Error
szlammy, I think you've got it. when i replaced that line with lstSites.additem "hello"
the program froze up!
How do I make the listbox available?
baja_yu, I don't think that the item checking is a problem coz I removed that part an it still didn't work.
If I helped you out, please consider adding to my reputation!
-- "The faulty interface lies between the chair and the keyboard" --
Re: Invalid Procedure Call Or Argument Stupid Error
hmm...
Now it seems to load the data into the listbox but then it freezes over.
I can see the first item in the listbox and I can see the scrollbar appear in the right size so that approx. the right amount of items are added but then it just freezes.
Any ideas??
If I helped you out, please consider adding to my reputation!
-- "The faulty interface lies between the chair and the keyboard" --
Re: Invalid Procedure Call Or Argument Stupid Error
Press F9 to place a breakpoint in where it adds the first item, then press F8 to step thru it to see where it hangs up. Remove any On Error statements. They might be masking something also, especially if you have a Resume Next.
Re: Invalid Procedure Call Or Argument Stupid Error
Does it freeze indefinitelly, or for a period of time? If it is the second one, then it is because it needs some time to load. What you should do is this, before loading code make the list invisible
List1.Visible = False
and after loading set it to visible again
List1.Visible = True
Also, add a DoEvents like in the loading For loop.