Click to See Complete Forum and Search --> : Compile Error Message
zomster
July 2nd, 2001, 06:30 AM
I am very new to VB, I been trying to follow tutorials to make my first basic apps.. I can get the look and all that done fine.. but I cant get it to actually work, right now I am trying to make a text editor and I cant get the save, new ect funtions to work, when I try to run them it gives me this error... Compile error: sub or function not definded.. any one know whats causing this? I have tired a few dif tutorials all same thing and I have re done them from scratch still nada dome some reading in the help on this error still havent fixed the prob..
Any one know whats causing this? I also tried to load in the complete script but get an error trying to open it.. I finally got a newer version of VB was using 4.0 before picked up 5.0 Pro real cheap until I can save up and buy 6.0.. would this be the problem using 5.0?
Zom
Cakkie
July 2nd, 2001, 06:57 AM
If you get the error sub or function not defined, it means that you are making a call to something that isn't there. Most of the time, this is a typpo. This has got absolutely nothing to do with the version of VB.
Another common mistake that causes this behaviour is when just typing the name of a control, without anything else, like when you are typing the name of a label, and halfway, you go and check something else in the code and forget to complete your line.
private Sub DoSomeThing()
' some code here
End Sub
private Sub Command1_Click()
DoSomething ' no problem
DoSimething ' sub or function not defined
Label1.caption = "Test" ' again, no problem
Label1 ' sub or function not defined
End Sub
Tom Cannaerts
slisse@planetinternet.be
Programming today is a race between software engineers striving to build bigger and better idot-proof programs, and the universe trying to produce bigger and better idiots. So far, the universe is winning -- Rich Cook
zomster
July 2nd, 2001, 10:12 AM
Still no luck getting this fixed.. I created a another text editor with just 1 option save and just trying to figure out how to get that 1 thing working.. You can D/L and look what I have done so far and see for your self what I am doing wrong.. I am am sure I am following the tuturial through correctly not missing any thing but I must be since it dont work.
Grr host wont let me upload that type of file, my ICQ is 4244789 if any one wants to help me further with this.
Zom
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.