| View previous topic :: View next topic |
| Author |
Message |
1337pwnage1337 Expert Cheater
Reputation: 0
Joined: 08 Oct 2008 Posts: 190 Location: last seen off the coast of hopes and dreams
|
Posted: Mon Jan 26, 2009 9:01 am Post subject: [Q] VB 2008 Error |
|
|
I am getting this error: | Code: | | Error1: 'Form1' is a type in 'FTP_Uploader' and cannot be used as an expression. C:\Documents and Settings\My Documents\Visual Studio 2008\Projects\FTP Uploader\FTP Uploader\Form1.Designer.vb FTP Uploader | with the attached source Do Not COPY MY SOURCE!!!!
There is 2 +reps for anyone that can help!
_________________
|
|
| Back to top |
|
 |
mathewthe2 Grandmaster Cheater
Reputation: 0
Joined: 28 Aug 2008 Posts: 562 Location: behind you... BOO!
|
Posted: Fri Jan 30, 2009 9:23 am Post subject: |
|
|
I dont really program in vb2008, so I couldn't open the files, but according to the error code, you must have referred to form1 somewhere in form1, use 'Me' without quotations instead.
_________________
|
|
| Back to top |
|
 |
1337pwnage1337 Expert Cheater
Reputation: 0
Joined: 08 Oct 2008 Posts: 190 Location: last seen off the coast of hopes and dreams
|
Posted: Fri Jan 30, 2009 12:46 pm Post subject: |
|
|
| mathewthe2 wrote: | | I dont really program in vb2008, so I couldn't open the files, but according to the error code, you must have referred to form1 somewhere in form1, use 'Me' without quotations instead. |
but there is no others except that which is NEEDED
_________________
|
|
| Back to top |
|
 |
killersamurai Expert Cheater
Reputation: 0
Joined: 10 Sep 2007 Posts: 197 Location: Colorado
|
Posted: Fri Jan 30, 2009 2:35 pm Post subject: |
|
|
| Code: |
Public Sub New(ByVal Filename As String)
_filename = Filename
End Sub
|
This is where the error is. One of the major downfalls of vb is that it is not case sensitive. That means new, New, nEw, etc. are the same. Since new is a keyword, you can't use it to name a variable, function, or anything that you want to use. To fix the error, you have to rename it or append an underscore to the beginning.
|
|
| Back to top |
|
 |
|