Jump to content
danira

[Resolvido] Erro em Select Case

Recommended Posts

danira

Select Case n1 = 1 = True
		Textbox6.BackColor = color.Green

		Case False
			TextBox6.BackColor = Color.Red
End Select

Error 1 Statements and labels are not valid between 'Select Case' and first 'Case'.

Alguém me pode dizer porque está a dar erro e o que posso fazer para o corrigir? :/

Share this post


Link to post
Share on other sites
nelsonr

Boas,

não consigo experimentar, mas vê se é isto:

Select Case n1 = 1
case True
	Textbox6.BackColor = color.Green
Case False
	TextBox6.BackColor = Color.Red
End Select

Ou:

If n1=1 Then
Textbox6.BackColor = color.Green
Else
Textbox6.BackColor = color.Red
End if

  • Vote 1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.