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 riberex00
Posts
#69466
Pessoal estou desenvolvendo uma planilha para controle financeiro. Ela é bem simples. Eu gostaria de escrever um código VBA que classificasse o ano e o mês. Classificar o ano eu até consegui, porém, não consigo que o VBA classifique o mês, pois, ele entende que é para classificar em ordem alfabética, tipo, A, B, C (...). Então, ele joga Fev, antes de Jan, por exemplo. Segue anexo o código que eu usei. Agradeço a ajuda, desde já. Obrigado.

Public Sub classificar ( )
Dim tabela As Range
wsbase.Sort.SortFields.Clear
Set tabela = Range("A2").CurrentRegion
With wsbase.Sort
.SortFields.Add tabela.Columns(1), xlSortOnValues, xlAscending
.SortFields.Add tabela.Columns(2), xlSortOnValues, xlAscending
End With
Plan1.Sort.SetRange tabela
Plan1.Sort.Header = xlYes
Plan1.Sort.Apply
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