What is the mistake in this cod?

PARSA

New Member
Joined
Jan 30, 2014
Messages
44
HELLO,
THIS COD IS NOT WORK! WHAT?
Code:
Dim C As Integer
For C = 1 To 2
LabelC.Enabled = True
Next
I HAVE 2 LABEL THAT HAVE THIS PROPERTIES: (Enabled = False)
AND I WANT TO CHANGE THIS PROPERTIES TO "TRUE" WITH THIS COD, BUT THIS COD NOT WORK!
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
Try this:
Code:
Dim C As Integer
For C = 1 To 2
LabelC.Enabled = True
Next [B][SIZE=2][COLOR=#b22222]C[/COLOR][/SIZE][/B]
 
Upvote 0
HELLO,
THIS COD IS NOT WORK! WHAT?
Code:
Dim C As Integer
For C = 1 To 2
LabelC.Enabled = True
Next
I HAVE 2 LABEL THAT HAVE THIS PROPERTIES: (Enabled = False)
AND I WANT TO CHANGE THIS PROPERTIES TO "TRUE" WITH THIS COD, BUT THIS COD NOT WORK!
1) Where is the label located at... on a worksheet or in a UseForm?

2) If on a worksheet, then what kind of label is it... a Forms label or an ActiveX label?
 
Upvote 0
Try your code this way...
Code:
Dim C As Integer
For C = 1 To 2
  Me.Controls("Label" & C).Enabled = True
Next
THANKS
51.gif
 
Upvote 0

Forum statistics

Threads
1,214,920
Messages
6,122,264
Members
449,075
Latest member
staticfluids

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top