Este fórum está sendo desativado

Depois de 9 anos, este fórum será desativado. Mas calma.... estamos migrando para uma comunidade no DISCORD. Junte-se a nós.

ENTRAR PARA DISCORD

Tópicos relacionados a códigos VBA, gravação de macros, etc.
  • Avatar do usuário
  • Avatar do usuário
#28174
Eu só quero salvar em uma celular determinada a Matricula que pede para abrir a Planilha.
quero apenas copiar e colar se a senha for verdadeira dentro do if.
'"Segue como esta a logica ate agora.
Vejam como ele ficou extenso pq não achei outra forma de utilizar as Matriculas
Lembrando que eu só preciso digitar uma Matricula
Não tem Senha só Usuario.
me ajudem abraços"
Código: Selecionar todos
Private Sub buttonok_Click()
If matricula.Value = Plan4.Range("l4").Value Then
   Unload frmacesso
   Application.Visible = True

Else
If matricula.Value = Plan4.Range("l5").Value Then
Unload frmacesso
   Application.Visible = True

Else
If matricula.Value = Plan4.Range("l6").Value Then
Unload frmacesso
   Application.Visible = True

Else
If matricula.Value = Plan4.Range("l7").Value Then
Unload frmacesso
   Application.Visible = True

Else
If matricula.Value = Plan4.Range("l8").Value Then
Unload frmacesso
   Application.Visible = True
   
   Else
If matricula.Value = Plan4.Range("l9").Value Then
Unload frmacesso
   Application.Visible = True
   
  Else
If matricula.Value = Plan4.Range("l10").Value Then
Unload frmacesso
   Application.Visible = True
   
   Else
If matricula.Value = Plan4.Range("l11").Value Then
Unload frmacesso
   Application.Visible = True
   
   Else
If matricula.Value = Plan4.Range("l2").Value Then
Unload frmacesso
   Application.Visible = True
   
   Else
If matricula.Value = Plan4.Range("l3").Value Then
Unload frmacesso
   Application.Visible = True
   
  Else
If matricula.Value = Plan4.Range("l14").Value Then
Unload frmacesso
   Application.Visible = True
   
  Else
If matricula.Value = Plan4.Range("l15").Value Then
Unload frmacesso
   Application.Visible = True
   
   Else
If matricula.Value = Plan4.Range("l16").Value Then
Unload frmacesso
   Application.Visible = True
   
  Else
If matricula.Value = Plan4.Range("l17").Value Then
Unload frmacesso
   Application.Visible = True
   
   Else
If matricula.Value = Plan4.Range("l18").Value Then
Unload frmacesso
   Application.Visible = True
   
   Else
If matricula.Value = Plan4.Range("l19").Value Then
Unload frmacesso
   Application.Visible = True
   
   
 Else
If matricula.Value = Plan4.Range("l20").Value Then
Unload frmacesso
   Application.Visible = True
   
   Else
If matricula.Value = Plan4.Range("l21").Value Then
Unload frmacesso
   Application.Visible = True
   
   Else
If matricula.Value = Plan4.Range("l22").Value Then
Unload frmacesso
   Application.Visible = True
   
   Else
If matricula.Value = Plan4.Range("l23").Value Then
Unload frmacesso
   Application.Visible = True
   
   Else
If matricula.Value = Plan4.Range("l24").Value Then
Unload frmacesso
   Application.Visible = True
   
   Else
If matricula.Value = Plan4.Range("l25").Value Then
Unload frmacesso
   Application.Visible = True
   
   Else
If matricula.Value = Plan4.Range("l26").Value Then
Unload frmacesso
   Application.Visible = True
   
   Else
If matricula.Value = Plan4.Range("l27").Value Then
Unload frmacesso
   Application.Visible = True
   
  Else
If matricula.Value = Plan4.Range("l28").Value Then
Unload frmacesso
   Application.Visible = True
   
  Else
If matricula.Value = Plan4.Range("l29").Value Then
Unload frmacesso
   Application.Visible = True
   
   Else
If matricula.Value = Plan4.Range("l30").Value Then
Unload frmacesso
   Application.Visible = True
   
   
   
     Else
     MsgBox "Matricula Incorreta ou não Autorizada"
End If
        End If
        End If
        End If
        End If
        End If
        End If
        End If
        End If
        End If
        End If
        End If
        End If
        End If
        End If
        End If
        End If
        End If
        End If
        End If
        End If

        
        End If
        End If
        End If
        End If
        End If
        End If
        End Sub

Private Sub buttoncançelar_Click()
Application.Quit

End Sub




Private Sub matricula_Change()

End Sub




End Sub

Private Sub UserForm_Initialize()
Application.Visible = False
End Sub
#28178
Bom dia!!

Veja um modelo anexo feito por Roy, tente adaptar.
http://www.excel-it.com/index.html

Ou:
http://www.tomasvasquez.com.br/forum/vi ... =20&t=5332

Att
Você não está autorizado a ver ou baixar esse anexo.
long long title how many chars? lets see 123 ok more? yes 60

We have created lots of YouTube videos just so you can achieve [...]

Another post test yes yes yes or no, maybe ni? :-/

The best flat phpBB theme around. Period. Fine craftmanship and [...]

Do you need a super MOD? Well here it is. chew on this

All you need is right here. Content tag, SEO, listing, Pizza and spaghetti [...]

Lasagna on me this time ok? I got plenty of cash

this should be fantastic. but what about links,images, bbcodes etc etc? [...]

Estamos migrando para uma comunidade no Discord