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.
Por PedroBB
Posts
#30372
Pessoal,
Na ComboBox2.List = Array("ON", "PN", "PNA", "PNB", "PNC", "PND", "PNE", "PNF"), ao selecionar PN (por exemplo), são carregados também ítens do tipo PNA, PNB, etc. e, no caso, era para carregar somente ítens do tipo PN.
Existe algum código para filtrar exatamente (exclusivamente) a string selecionada?


Obs: Também postei no link:
http://www.tomasvasquez.com.br/forum/vi ... =20&t=6082
#30375
Anexa a planilha para podermos lhe ajudar.
Por PedroBB
Posts
#30387
Solução do Professor Reinaldo (http://www.tomasvasquez.com.br/forum/vi ... =20&t=6082)

Sua rotina "BuscaPersonalizada", no controle ..>LookAt<.. consta como xlPart, assim e feita uma pesquisa caracter a caracter procurando uma combinação. Notivo de quando procura PN tambem recebe PNA....
Para sanar essa desconformidade, deve ser alterado esse trecho para ..>xlWhole<..


With Planilha11
If sSearchInCol = "" Then
Set Busca = .Cells.Find(What:=TermoPesquisado, After:=.Range("A1"), LookIn:=xlFormulas, _
LookAt:=xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False)
Else
Set Busca = .Range(sSearchInCol & ":" & sSearchInCol).Find( _
What:=TermoPesquisado, _
After:=.Range(sSearchInCol & "1"), _
LookIn:=xlFormulas, LookAt:=xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False)
End If
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