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
Por vilc
Posts
#73202
Boa Noite, preciso de uma ajuda para fazer um filtro numa listbox, selecionando dois ou mais critérios.
desde já agradeço.
Você não está autorizado a ver ou baixar esse anexo.
Por vilc
Posts
#73206
Foxtri teria como colocar um botão, para colocar em ordem alfabética por secretária?
Mas quando fechar o formulário não salvar, manter a ordem que foi cadastrado,
Esse botão seria mesmo só pra colocar em ordem alfabética, que ando eu precisasse imprimir.
A parte de impressão já está funcionando!
Desde já agradeço
Por vilc
Posts
#73209
Boa tarde, consegui listar em ordem alfabética com esse código abaixo:

Private Sub CBOrdemAlfabetica_Click()

' CLASSIFICA EM ORDEM ALFABÉTICA PELA COLUNA SECRETARIA O LISTBOX EQUIPAMENTOS
Dim Lista() As Variant
Dim TEMP As String
Dim i, j, X As Long

Lista = Me.ListBoxEquipamentos.List

For i = LBound(Lista) To UBound(Lista) - 1
For j = i + 1 To UBound(Lista)
If UCase(Lista(i, 4)) > UCase(Lista(j, 4)) Then
For X = 0 To (Me.ListBoxEquipamentos.ColumnCount - 1) Step 1
On Error Resume Next
TEMP = Lista(i, X)
Lista(i, X) = Lista(j, X)
Lista(j, X) = TEMP
Next X
End If
Next j
Next i

Me.ListBoxEquipamentos.List = Lista



End Sub
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