|
-
Feb 27th, 2007, 05:42 PM
#1
Thread Starter
New Member
keys for visual basic collections
I am looking in Microsoft's explanations- to add an item to a collection:
workOrders.Add(woNew,woNew.ID.ToString())
which seems simple enough, except when I translate it to textboxes
First of all what does ID stand for? Is it part of vb's vocabulary or is it a variable the writer dreamed up? In my collection of textboxes below, what corresponds to woNew.ID?
Public Class Form1
Dim manytextbox as New Microsoft.Visualbasic.Collection()
Private Sub MAKETEXTBOX(BYVAL horiz as Integer, byVal vert as Integer,byval sq as integer)
dim x as string=" "
manytextbox.Add(textbox1, tostring(x))
I get a wortless message about "Overload resolution failed because of no accessible 'toString' accepts this number of arguments. I don'thave too many arguments for ToString; I have only one argument called 'x'.
statements like
textbox1.text=manytextbox.count/9
textbox1.width=sq+3
have been working fine.
It's when I want to use a key that I have the problem.
I appreciate your help.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|