Jump to content
Sign in to follow this  
Boleta

[Aula 5] Clausulas de Programação

Recommended Posts

Boleta    1
Boleta

Originally posted by kinabr

Quero saber o q tem de errado no meu code

Private Sub Command1_Click()Dim i As IntegerMsgBox , "O q q vc é?", vbExclamation + vbOKOnly, "O q q foi?"InputBox , "0 = Normal, 1 = retardado, 2 = debi mental ,3 =  maluco ou 4 = extraterrestre",  vbExclamation + vbOKOnly, "Vc é normal?"For i = 0 To 5If i = 1 ThenMsgBox , "N pense q vai ter sua resposta", vbExclamation + vbOKOnly, "^^"End IfNextMsgBox "VOCÊ É MALUCO RETARDADO E TD RUIM DE Q EXISTE NO MUNDO", vbExclamation + vbOKOnly, "BABACA"End sub
Você adicionou Virgulas no início das MsgBox e InputBox. Acredito que seja apenas isso. O resto está ótimo ^^.

 

 

@Vufusuf

 

Excelente mano!! Fantástico!!

Existem geitos mais fáceis de se fazer isso, porém vocês ainda não aprenderam. O que importa é que você atingiu o objetivo =].

Este talvez tenha sido um dos melhores trabalhos postado em aulas, na minha opinião.

 

Abraços,

//Bol~

Share this post


Link to post
Share on other sites
Jovial    2
Jovial

to gostando das suas aulas ^^, isso é bem semelhante a actions xD

Share this post


Link to post
Share on other sites
Firelias    0
Firelias

gente to com otra duvida =X

olha o codigo:


Private Sub Command1_Click()

Dim nome As String

nome = InputBox("Digite seu nome:")

If nome = Firelias Then

MsgBox "Não diga esse nome em público assim, diga Deus."

Else

MsgBox "Olá " & nome & "! Esse foi meu teste simples de clasulas condicionais ^^"

End If

End Sub

ja tentei de tudo =/

 

quando eu boto

 

If &nome& com o & junto ou separado da 1 erro =/

 

qq eu tenho q fazer pra ajeitar isso?

 

@Vufusuf

O.o

krl mew tu pega o jeito mtu rapido!

parabéns!

 

 

_________edit_________

percebi q qdo eu clico no X pra fexar ele aparece a mensagem que era pra aparecer quando alguem escrevesse firelias xD

Share this post


Link to post
Share on other sites
Boleta    1
Boleta

Tente:


If nome = "Firelias" Then

 

//Bol~

Share this post


Link to post
Share on other sites
Dopado    0
Dopado

Private Sub Command1_Click()

Dim i As Integer

Do Until i = 10

i = i + 1

If Text1.Text = "Escreva Seu Texto Aki" Then

Text1.Text = "ESCREVE LOGO! NÃO CLIKE ALI ATÉ TER ESCRITO!"

Else

MsgBox Text1.Text & "... Janela Nº" & i, vbOKOnly + vbInformation, "Correto!"

End If

Loop

End Sub

 

Checa Ae :0

Share this post


Link to post
Share on other sites
Firelias    0
Firelias

valeu bol!

salvou a pátria aki =]

flws

Share this post


Link to post
Share on other sites
Dankoo    1
Dankoo

@Vufusuf kra, mto dooooidooo!!!! posso pegar algumas ideias? fiko ótimo, parabens =]~

 

 

( poe timer pra cada resposta q fik melhor, hehe, tem como fazer isso? )

Share this post


Link to post
Share on other sites
Flatronez    1
Flatronez

Consegui fazer, eu adaptei em um programinha que eu estou montando.

 

Lá vai:

Private Sub Command1_Click()



Dim Valor As String

Dim Valor3 As String

Dim Valor2 As String

Dim Mensagem As String



Valor = InputBox("Seu nome:")

Label1.Caption = "Seu nome é: " & Valor & " ."

If Label1.Caption = "Seu nome é: " & Valor & " ." Then MsgBox "Que nome feio esse seu!!!"





Valor2 = InputBox("Sua Idade:")

Label2.Caption = "Sua idade é: " & Valor2 & " anos."

If Label2.Caption = "Sua idade é: " & Valor2 & " anos." Then MsgBox "Duvido!! Com essa cara você deve ter uns 80 anos!!!"





Valor3 = InputBox("Cidade onde mora:")

Label3.Caption = "Você mora em: " & Valor3 & " ."

If Label3.Caption = "Você mora em: " & Valor3 & " ." Then MsgBox "Isso é uma cidade??? Parece mais um esconderijo ultra-secreto!!!"



Mensagem = "HAHAHAHAHAHAHA!!!! Você caiu como patinho! Seus dados estão salvos e sua casa está sendo rastreada."

Label7.Caption = Mensagem

End Sub



Private Sub Form_Load()

Dim i As Integer

Dim Nome As String





Nome = InputBox("Por favor, digite seu nome:")

MsgBox "Olá, " & Nome & " este é o Salvador de Dados v1.0, Clique em OK para iniciar."

MsgBox "COnte até 10 e inicie o programa"

Do Until i = 11

MsgBox i

i = i + 1

Loop



End Sub

Share this post


Link to post
Share on other sites
papones    0
papones

aee bol , poderia verificar minha tarefa de casa? brigado!:D

 

Private Sub Command1_Click()

If Text1.Text = "gosto" Then

Label1.Caption = "Nickelback é coisa de viado"

Else

Label1.Caption = "nickelback é coisa de viado"

End If

 

End Sub

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×