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 Tuca
#25130
Bom dia a todos

Estou elaborando um PDV onde coloco as itens de venda na Listview e posteriormente colocar em uma sheets onde posso ter um histórico de todas as vendas.

O grande problema esta em enviar as informações para a sheets, só estou conseguindo colocar na primeira linha e quando efetuo a outra venda a venda anterior é substituída.

Esse é o código que utilizei

Dim i, j As Integer

Plan7.Range(Cells(2, 4), Cells(10000, 8)).Select
Selection.ClearContents


'Loop para as linhas
For i = 1 To ListView1.ListItems.Count

Plan7.Cells(i + 1, 1) = ListView1.ListItems(i).Text

'loop para a coluna
For j = 1 To 1
Plan7.Cells(i + 1, 4) = ListView1.ListItems(i).ListSubItems(1).Text
Plan7.Cells(i + 1, 5) = ListView1.ListItems(i).ListSubItems(2).Text
Plan7.Cells(i + 1, 6) = ListView1.ListItems(i).ListSubItems(3).Text
Plan7.Cells(i + 1, 7) = ListView1.ListItems(i).ListSubItems(4).Text
Plan7.Cells(i + 1, 8) = ListView1.ListItems(i).ListSubItems(5).Text


Next j

Next i
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