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
Por DiMoura
Posts Avatar
#37747
ola, gostaria de saber como faço pra ficar registrado a ultima pesquisa realizada..
o codigo q estou usando é esse...
Private Sub Txt_Forn_Pes_Exit(ByVal Cancel As MSForms.ReturnBoolean)
If ActiveSheet.FilterMode = False Then

ElseIf ActiveSheet.FilterMode = True Then

ActiveSheet.ShowAllData

Else

End If

ActiveSheet.Range("$A$2:$G$143592").AutoFilter Field:=5, Criteria1:="=*" & Me.Txt_Desc_Pes.Value & "*"
ActiveSheet.Range("$A$2:$G$143592").AutoFilter Field:=4, Criteria1:=Me.Txt_Forn_Pes.Value & "*"
Lista.ListItems.Clear
Sheets("BASE").Select


LIN = 2
Do Until Sheets("BASE").Cells(LIN, 2) = ""
If Cells(LIN, 1).Rows.Hidden = False Then

Set li = Lista.ListItems.Add(Text:=Sheets("BASE").Cells(LIN, 2).Value)
li.ListSubItems.Add Text:=Sheets("BASE").Cells(LIN, 5).Value
li.ListSubItems.Add Text:=Sheets("BASE").Cells(LIN, 3).Value
li.ListSubItems.Add Text:=Sheets("BASE").Cells(LIN, 4).Value
li.ListSubItems.Add Text:=Format(Sheets("BASE").Cells(LIN, 6).Value, "currency")
li.ListSubItems.Add Text:=Sheets("BASE").Cells(LIN, 7).Value
li.ListSubItems.Add Text:=Sheets("BASE").Cells(LIN, 8).Value


End If

LIN = LIN + 1

Loop

Set li = Nothing

End Sub se algum puder ajudar agradeço..
Avatar do usuário
Por DiMoura
Posts Avatar
#37748
gostaria que quando fizesse a pesquisa e fechasse o formulario, ao abrir novamente o formulario de pesquisa estivesse a ultima pesquisa feita...
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