Error "e is already declared

If you need help with a project or need to know how to do something specific in VB.NET then please ask your questions in here.
Forum rules
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
20 posts Page 1 of 2
Contributors
User avatar
hungryhounduk
VIP - Site Partner
VIP - Site Partner
Posts: 2870
Joined: Mon Jul 27, 2009 11:58 am

Error "e is already declared
hungryhounduk
Hi All

I was just doing a Decrypter App from a Tutorial, In the Tutorial i have 2 subs with the same strings and I am getting an error on the Letter e, as It's already Declared?

Dim a, b, c, d, e,(This is the Error) f, g, h, i, j, k, l , m, n, o, p, q, r, s, t, v, w, x, y, z As String
Dim outcome As String

a = "a"
b = "b"
c = "c"
d = "d"
e = "e"


Can some kind Soul point me in the right direction to sort the ERROR out

Cheers

Chris

ps/// I have encluded the Source below, so if someone could just take a look, as you might be able to just sort it with a little knowhow.......
You do not have the required permissions to view the files attached to this post.
Last edited by hungryhounduk on Thu Jan 02, 2014 12:40 pm, edited 1 time in total.
Image
User avatar
noypikami
VIP - Donator
VIP - Donator
Posts: 151
Joined: Sat Dec 22, 2012 1:49 am

Re: Error "e is already declared
noypikami
make sure that those letters has not something in common on its value when encrypted.
User avatar
Dummy1912
VIP - Donator
VIP - Donator
Posts: 1969
Joined: Sat Aug 21, 2010 2:17 pm

Re: Error "e is already declared
Dummy1912
if your sub contains a 'e' already then you can't use the e again
like for example

private sub demo (byval e as ....)
so if you use here the e from your dim then you get 'e It's already Declared'
visit us on:


http://www.softpedia.com/get/System/Lau ... -Run.shtml
Check it out ! http://www.softpedia.com/publisher/I-A- ... 90017.html
Check it out ! http://www.softpedia.com/get/Desktop-En ... lock.shtml
User avatar
visualtech
VIP - Donator
VIP - Donator
Posts: 265
Joined: Sat Nov 19, 2011 2:19 pm

Re: Error "e is already declared
visualtech
that depends if this code is inside a Click Handler (or any other "Sub" with the "Handles" clause); the reason being that: It is a standard EventArgument variable for .NET
Image
User avatar
hungryhounduk
VIP - Site Partner
VIP - Site Partner
Posts: 2870
Joined: Mon Jul 27, 2009 11:58 am

I have posted up the source in the first post, can someone take a look at it, it will be an easy fix for someone who knows what they are doing :)
Image
User avatar
Dummy1912
VIP - Donator
VIP - Donator
Posts: 1969
Joined: Sat Aug 21, 2010 2:17 pm

Re: Error "e is already declared
Dummy1912
you have 2x e in your code
please try to change the dim e with e1 for example


Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim a, b, c, d, e, f, g


this cause the error :)
visit us on:


http://www.softpedia.com/get/System/Lau ... -Run.shtml
Check it out ! http://www.softpedia.com/publisher/I-A- ... 90017.html
Check it out ! http://www.softpedia.com/get/Desktop-En ... lock.shtml
User avatar
hungryhounduk
VIP - Site Partner
VIP - Site Partner
Posts: 2870
Joined: Mon Jul 27, 2009 11:58 am

Hi Dummy
ok i will try that :)

Thanks

Chris
Image
User avatar
hungryhounduk
VIP - Site Partner
VIP - Site Partner
Posts: 2870
Joined: Mon Jul 27, 2009 11:58 am

Ok I tried that with a e1 and an e2, but still an error
Image
User avatar
Dummy1912
VIP - Donator
VIP - Donator
Posts: 1969
Joined: Sat Aug 21, 2010 2:17 pm

Re: Error "e is already declared
Dummy1912
i didn't get any errors i run it build
works fine without errors
visit us on:


http://www.softpedia.com/get/System/Lau ... -Run.shtml
Check it out ! http://www.softpedia.com/publisher/I-A- ... 90017.html
Check it out ! http://www.softpedia.com/get/Desktop-En ... lock.shtml
User avatar
noypikami
VIP - Donator
VIP - Donator
Posts: 151
Joined: Sat Dec 22, 2012 1:49 am

Re: Error "e is already declared
noypikami
dummy is right.. just change the "e". i just tested it and its working...

you may try mine too, i made this long time ago.
you will have alot of ideas from this.
it works the same likes yours, and the code is much shorter.
source code and exe are encluded in a zip file.


This file is hosted off-site.
Last edited by noypikami on Thu Jan 02, 2014 1:32 pm, edited 1 time in total.
20 posts Page 1 of 2
Return to “Coding Help & Support”