|
Thread: me.
-
Apr 28th, 2001, 04:21 PM
#1
Thread Starter
Frenzied Member
me.
when you type me.width you are reffering to the form, no matter what control/procedure you put it in.
Is there something similar for the current procedure. ?
like when a label is clicked, I want it to say "hi", and if I have over 100 labels on the form... it will take a while to code.
thanks
dimava
By the way: that was just an example
NXSupport - Your one-stop source for computer help
-
Apr 28th, 2001, 04:32 PM
#2
Hyperactive Member
I assume the labels are in an array?
Code:
Private Sub Label1_Click(Index As Integer)
Dim intX As Integer
Label1(intX).Caption = "Hi"
End Sub
 Mahalo 
VB6(SP5), VC++, COBOL, Basic, JAVA
MBA, MCSD, MCSE, A+
Computer Forensics
-
Apr 28th, 2001, 04:42 PM
#3
Thread Starter
Frenzied Member
no array, I'm just wondering if there is a thing such as me.caption for the current control
NXSupport - Your one-stop source for computer help
-
Apr 28th, 2001, 04:46 PM
#4
Hyperactive Member
No, Me reffers to the current form.
Stick a label on a form. In the labels click event procedure type:
Me.Caption = "Hi"
The Form's caption changes to Hi, not the label.
 Mahalo 
VB6(SP5), VC++, COBOL, Basic, JAVA
MBA, MCSD, MCSE, A+
Computer Forensics
-
Apr 28th, 2001, 04:57 PM
#5
Don't know if you can do it with a label, but other controls that can be set to have the focus, than you can use something like this:
Code:
Private Sub Command1_Click()
Me.ActiveControl.Caption = "Hello World"
End Sub
-
Apr 28th, 2001, 05:03 PM
#6
Thread Starter
Frenzied Member
thanks matt, I guess thats kinda what I was looking for, but it doesn't work with labels
NXSupport - Your one-stop source for computer 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
|