473,473 Members | 2,025 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Duplicate Object Names ? - I must have goofed something.

What have I done wrong here.

I use to have a tool strip button called home on my tool strip on the top of
my form.
By double clicking on the button, I got my sub to show as follows.

Private Sub tsbHome_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs)
<code was here ...but is irrelevant>
End Sub
If I look at my form code, the above is still there. But now, if I double
click on my exact same button, it pulls up
a brand new sub. ( below )...totally ignoring the one above. It also put a
_1 on it. The "NAME" property of the
button is still tsbHome.

Private Sub tsbHome_Click_1(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles tsbHome.Click

End Sub
This is happening to a couple of my buttons. Any ideas what I have done
wrong, and what i can do to fix this?

Thanks,

Miro

Feb 12 '07 #1
2 915
"Miro" <mi******@golden.netschrieb
What have I done wrong here.

I use to have a tool strip button called home on my tool strip on
the top of my form.
By double clicking on the button, I got my sub to show as follows.

Private Sub tsbHome_Click(ByVal sender As System.Object, ByVal
e As System.EventArgs)
<code was here ...but is irrelevant>
End Sub
If I look at my form code, the above is still there. But now, if I
double click on my exact same button, it pulls up
a brand new sub. ( below )...totally ignoring the one above. It
also put a _1 on it. The "NAME" property of the
button is still tsbHome.

Private Sub tsbHome_Click_1(ByVal sender As System.Object, ByVal
e As System.EventArgs) Handles tsbHome.Click

End Sub
This is happening to a couple of my buttons. Any ideas what I have
done wrong, and what i can do to fix this?

The "Handles.." part is missing at tsbHome_Click. That's why there's no
association between the sub and the event. If you select the Click event, it
must create a new sub "*_1" because there's already one with the default
name. Don't know why "Handles" has been removed, perhaps by some
cut&paste/drag&drop.
Armin

Feb 12 '07 #2
That makes sence.
I was doing some cutting and pasting between some toolbars. It probably
cleared it.

I never realized it actually links thru the "Handles" portion.

Thank you, - it makes sense now.

Miro
"Armin Zingler" <az*******@freenet.dewrote in message
news:e1**************@TK2MSFTNGP06.phx.gbl...
"Miro" <mi******@golden.netschrieb
>What have I done wrong here.

I use to have a tool strip button called home on my tool strip on
the top of my form.
By double clicking on the button, I got my sub to show as follows.

Private Sub tsbHome_Click(ByVal sender As System.Object, ByVal
e As System.EventArgs)
<code was here ...but is irrelevant>
End Sub
If I look at my form code, the above is still there. But now, if I
double click on my exact same button, it pulls up
a brand new sub. ( below )...totally ignoring the one above. It
also put a _1 on it. The "NAME" property of the
button is still tsbHome.

Private Sub tsbHome_Click_1(ByVal sender As System.Object, ByVal
e As System.EventArgs) Handles tsbHome.Click

End Sub
This is happening to a couple of my buttons. Any ideas what I have
done wrong, and what i can do to fix this?


The "Handles.." part is missing at tsbHome_Click. That's why there's no
association between the sub and the event. If you select the Click event,
it must create a new sub "*_1" because there's already one with the
default name. Don't know why "Handles" has been removed, perhaps by some
cut&paste/drag&drop.
Armin

Feb 12 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

44
by: Xah Lee | last post by:
here's a large exercise that uses what we built before. suppose you have tens of thousands of files in various directories. Some of these files are identical, but you don't know which ones are...
7
by: Voetleuce en fênsievry | last post by:
Hello everyone. I'm not a JavaScript author myself, but I'm looking for a method to remove duplicate words from a piece of text. This text would presumably be pasted into a text box. I have,...
18
by: Elroyskimms | last post by:
I have a table using an identity column as its Primary Key and two columns (table reduced for simplicity) EmployeeNumber and ArrivalTime. CREATE TABLE ( IDENTITY (1, 1) NOT NULL , (10)...
2
by: hemant.singh | last post by:
I am stuck with strange JS issue My product gives user to show some images(which track mouseover) on page by embedding script like <script src=http://domain.com/GetDynamicJS?domagic=1>...
8
by: Iona | last post by:
Hi Allan, I'm using a nifty piece of code you put on here some time back to do a duplicate entry check as below. I'm using to check for duplicate names. However I am getting an error message on...
22
by: Cylix | last post by:
I have a 4row x 1col table, I would like to drop all the content of row three. Since Mac IE5.2 does not suppport deleteRow method, I have also try to set the innerHTML=''; but it does not work. ...
4
by: | last post by:
Given an XML file (dataset.writexml), here is my output (simplified for this posting): <?xml version="1.0" standalone="yes"?> <NewDataSet> <Category> <CategoryId>80</CategoryId>...
5
by: Brett Barry: Go Get Geek! | last post by:
Hello, Can someone please paste VBA code and how I would go about doing this?: I have a customer table with over 6000 duplicates in the field called "Customer". While the customer names may...
275
by: Astley Le Jasper | last post by:
Sorry for the numpty question ... How do you find the reference name of an object? So if i have this bob = modulename.objectname() how do i find that the name is 'bob'
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.